Authentication failed; no valid credentials available
With this code I get a error message "Authentication failed; no valid credentials available"
My code:
var ws = new WebSocket('wss://ws.binaryws.com/websockets/v3?app_id='); ws.onopen = function(evt) { ws.send(JSON.stringify({ticks:'R_100'})); }; ws.onmessage = function(msg) { var data = JSON.parse(msg.data); document.getElementById("teste").innerHTML = data; };
Answers
app_id=1
you not posted app_id
try: var ws = new WebSocket('wss://ws.binaryws.com/websockets/v3?app_id=1');