Emotiv / cortex-example

Example with Cortex V2/V3 API
https://emotiv.com
MIT License
202 stars 115 forks source link

authorize error about behavior #129

Closed ivaylov closed 3 years ago

ivaylov commented 3 years ago

I authorize with this code but giving following error any suggestion?

{ "id": 1, "jsonrpc": "2.0", "method": "authorize", "params": { "clientId": "xxx", "clientSecret": "xxx" } }

Subscription: {"error":{"code":-32018,"data":{"behavior":"This parameter is required: cortexToken"},"message":"Missing the required parameters."},"id":1,"jsonrpc":"2.0"} Profile Set-up: {"error":{"code":-32018,"data":{"behavior":"This parameter is required: cortexToken"},"message":"Missing the required parameters."},"id":1,"jsonrpc":"2.0"} Mental Command Brain Map: {"error":{"code":-32018,"data":{"behavior":"This parameter is required: cortexToken"},"message":"Missing the required parameters."},"id":1,"jsonrpc":"2.0"}

bchaperon commented 3 years ago

Hi @ivaylov

After you send the request "authorize", you must wait for the response from Cortex, and extract the Cortex token from this response. Then you must pass this token as an argument of other methods like "subscribe" or "mentalCommandBrainMap".