# 0 : {T: 'error', code: 402, msg: 'auth failed'}

**URL:** <https://forum.alpaca.markets/t/0-t-error-code-402-msg-auth-failed/10926>\
**Category:** Alpaca Trading\
**Created:** [October 28, 2022, 11:57am UTC](https://forum.alpaca.markets/t/0-t-error-code-402-msg-auth-failed/10926 "2022-10-28T11:57:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![chatofking](https://avatars.discourse-cdn.com/v4/letter/c/278dde/32.png) [@chatofking](https://forum.alpaca.markets/u/chatofking)\
**Post date:** [October 28, 2022, 11:57am UTC](https://forum.alpaca.markets/t/0-t-error-code-402-msg-auth-failed/10926/1 "2022-10-28T11:57:18Z")

</div>

I use javascript  
I get an error when I try to stream real-time crypto data  
0 : {T: ‘error’, code: 402, msg: ‘auth failed’}  
You have provided invalid authentication credentials.  
what should i do??
