Here is a list of the error codes that the Cortex API can return. This list is not exhaustive (yet) and will be updated in the future.
-32700 Parse Error
The message you sent to Cortex is not a valid JSON object. This is a bug is your application.
-32600 Invalid Request
The message you sent to Cortex is a valid JSON object but it doesn't contain the expected fields. This a bug is your application. Please check Connecting to the Cortex API
-32601 Method Not Found
You sent a request with an invalid method name. This a bug is your application. Please check this documentation to see which methods are available.
-32602 Invalid Parameters
You sent a request to call a valid method, but the parameters are wrong. It can be because:
You didn't provide a required parameter
You provided a parameters with an invalid name
The name of parameter is correct but the value is invalid
This is a bug in your application. Please check the documentation of the method.
-32603 Internal Error
An unexpected error happened in Cortex while processing your request. This is probably a bug in Cortex. If the problem persists, please contact the EMOTIV customer support.
-32000 Server Internal Error
An unexpected error happened in the EMOTIV cloud while processing your request. It can be a temporary failure of the EMOTIV servers, like when the servers are in maintenance. Or it can be a bug in Cortex. If the problem persists, please contact the EMOTIV customer support.
-32002 Invalid License ID
The EMOTIV cloud cannot find the license of the user. When you call the method authorize, please make sure that you provide a valid license ID, or no license parameter at all. If the problem persists, then the owner of the license must contact the EMOTIV customer support.
-32003 Internet Connection Error
Cortex must connect to the EMOTIV cloud to process your request, but the connection failed. Please make sure that you computer has a working internet connection.
-32004 Headset Unavailable
You sent a request to perform an action on a specific headset, but Cortex cannot find this headset. Some possible reasons for this error:
You provided an invalid headset ID in your request
The headset was disconnected (maybe it is out of range of your computer)
The headset was switched off
-32005 A session already exists with this headset
You called the method createSession for a specific headset, but your application already has a session for this headset. This is a bug in your application. You cannot create 2 sessions for the same headset at the same time. You must close the existing session before creating a new one.
-32006 No license to activate a session
You called createSession or updateSession with the parameter "status" set to "active", but your license doesn't authorize you to activate a session. You have a paid EMOTIV license to activate a session. If you already have such a license but the problem still persists, then contact the EMOTIV customer support. You should also read the prerequisite.
-32007 The session doesn't exist
You included a session ID in the parameters of your request, but Cortex cannot find this session. It can be because you session ID is invalid or because the session is already closed.
You called a method that requires an active session, but the current session is inactive. It can happen if you call createRecord on an inactive session.
-32014 Invalid Cortex token
You included a Cortex token in the parameters of your request, but this token is invalid. This is a bug in your application. When a method requires a Cortex token, please make sure that your token comes from the result of the method authorize.
-32015 The Cortex token has expired
Your Cortex token has expired. You must call the method authorize again to get a new token. The Cortex token is valid for 48 hours.
-32016 Invalid stream
You called the methods subscribe or unsubscribe with an invalid stream. The stream can be invalid for one of these reasons:
The name of the stream is incorrect. Check Data Subscription for the list of the available streams.
The stream is not available for this headset. For example, the motion data of an EPOC X headset can be disable.
The stream is "eeg" but the license doesn't allow you to access this stream. You can check the license with getLicenseInfo
-32017 Record already started
You called createRecord for a specific session, but your application already started a record for the same session. You cannot create 2 records for the same session at the same time.
-32019 Session limit has been reached
You tried to activate a session (with createSession or updateSession) but the "localQuota" of the license is zero. You can check the "localQuota" by calling the method getLicenseInfo. Every time you activate a session, the local quota of the license is reduced by 1.
To solve this error, you must increase the local quota of the license. Call authorize with the parameter "debit". For example, you can call authorize with a "debit" of 10, and this will increase the local quota by 10. Then you will be able to create and activate 10 sessions on this computer.
-32020 The headset must be connected with a USB cable
You called updateHeadset but the headset is connected to the computer via Bluetooth or a USB dongle. Instead, the user should connect the headset with a USB cable.
-32021 Invalid client credentials
Your request includes an invalid client ID or an invalid client secret.
-32022 Device limit has been reached
The license was used on too many devices (eg computer, tablet, phone...) The license has a device limit. You can check it by calling the method getLicenseInfo. If you want to increase the limit or transfer the license from 1 device to another, then please contact the EMOTIV customer support.
-32024 The license has expired
The license of the user has expired. You can check the license with getLicenseInfo. After the license is renewed, your application must call authorize to get a new token.
-32027 Cannot use this license
You called authorize with a valid license ID but your application doesn't have the permission to use this license.
-32029 License hard limit has been reached
When the computer is offline, you can use the license for a limited period of time. The end of this period is the "hard limit" of the license. You can check it with getLicenseInfo. After the "hard limit" has been reached, Cortex must connect to the EMOTIV cloud to validate the license again. To solve this problem, the computer must have an internet connection and then you must call authorize.
-32031 Invalid profile name
You sent a request to perform an action on a specific training profile, but Cortex cannot find this profile.
-32033 No user
Cortex cannot process your request because no user is logged in. You must ask the user to log in in EMOTIV Launcher.
-32034 The Cortex token is for another user
Your request includes a Cortex token that was created for a specific user, but the current user is a different one. In that case, that must call authorize again and get a new token. You can check the current user with getUserLogin.
-32037 Cannot train this action
You called training for an action that cannot be trained.
-32044 Profile already loaded on another headset
You tried to load a training profile for a specific headset, but this profile is already loaded for another headset. You cannot load the same profile on 2 different headset at the same time.
-32045 No profile loaded for this headset
You tried to unload a training profile from a headset, but no profile was loaded for this headset.
-32046 Profile loaded by another application
You tried to perform an operation (eg setupProfile, training...) on a training profile, but this profile was loaded by another application. An application can only access a profile that loaded by itself. You can call getCurrentProfile to check if your application loaded the profile of a headset or not.
-32102 Not approved in EMOTIV Launcher
The user didn't approved your application yet. The user must open EMOTIV Launcher and approve your application.
-32104 Failed to connect or disconnect the headset
Cortex failed to communicate with the headset. Maybe the wireless connection between the headset and the computer was interrupted. Your application should try again. You can also call queryHeadsets to check the status of the headset.