Error Codes
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. Please make sure your internet is not blocked by any firewall or security, see Whitelisting Domains for EMOTIV Applications.
-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.
Many methods can return this error: updateSession, subscribe, unsubscribe, createRecord, injectMarker, training, etc...
-32012 The session must be activated
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.
The authorize requires Internet access. If you want your app to stay offline for longer time, you should call generateNewToken to generate a new token from the expired token.
-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.
-32032 Multi Emotiv ID user
You can got this error when call login while there is already a EmotivID user logged in. Before login in, you should check if there is logged in EmotivID user via getUserLogin API.
This error is only available on Cortex version which support login API (for example: Cortex embedded lib).
-32033 EmotivID user is not logged in
Cortex cannot process your request because no EmotivID user is logged in.
For the Cortex websocket server, you must ask the user to log in in EMOTIV Launcher.
For other Cortex version which supports login, you must call login first.
-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.
-32035 EmotivID is not matching with logged in user
You will get this issue if the username
is not the same with currently logged in EmotivID user.
Related API are logout. This API is only available for the Cortex embedded lib.
-32037 Cannot train this action
You called training for an action that cannot be trained. Please see available actions here.
-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.
-32106 The user account is not active
The EMOTIV ID of the user is inactive. The app will get this error when the user has registered the EmotivID account but haven't activated via email yet.
-32107 Cannot accept license agreement
If you got this error when calling acceptLicense API, there is a bug in our Cortex or Emotiv Cloud. Please report this issue to EMOTIV customer support.
This acceptLicense is only available on the Cortex embedded lib.
-32108 Cloud token error
The EMOTIV cloud refused the user credentials provided by Cortex. The user must logout and login again.
-32109 Cortex token error
There is something wrong with the Cortex token. Your application must call authorize to get a new Cortex token.
-32111 The information cannot be found in database
For APIs that need information from the local database, if Cortex cannot find this information in the database, this error is returned. This error is general and can be returned for any API. If the problem persists, please contact EMOTIV customer support.
-32112 The session is already active
You tried to activate a session that is already active. You can call querySessions to check the status of your sessions.
-32113 Invalid record ID
You are trying to access a record that doesn't exist, or the record exist but you don't have the permission to access it.
-32114 No record in progress
You are trying to inject a marker or to stop a record but no record is is progress.
-32115 The time of the marker is too far in the past
You are trying to inject a marker but its time is too far in the past. You should inject your markers in real time, at the moment the event you want to mark happens.
Sometimes you may get the issue because the difference between the time system in your app and the headset time system in Cortex is considerable. In this case, to have better synchronization with the headset time system, please use the syncWithHeadsetClock API.
-32116 The time of the marker is too far in the future
You are trying to inject a marker but its time is too far in the future. You should inject your markers in real time, at the moment the event you want to mark happens.
Sometimes you may get the issue because the difference between the time system in your app and the headset time system in Cortex is considerable. In this case, to have better synchronization with the headset time system, please use the syncWithHeadsetClock API.
-32117 Marker not found
You called updateMarker with an invalid marker id.
-32118 The profile name already exists
You are trying to create or rename a training profile, but another profile with the same name already exists.
-32119 The marker is already stopped
You are trying to update a marker that was already updated before.
-32120 headset mapping config name already exists
You can get this error when calling configMapping API on EMOTIV Flex or Xtrodes headset.
-32122 Cortex is starting
The app will get this error sometimes after the app connection is established to Cortex web socket server or after the app call CortexLib::start() API of the Cortex embedded lib, when it takes long for Cortex to be ready, especially when Cortex needs to do some database upgrading. In this case, the app only needs to wait for a while and remake API calls.
-32123 Corrupted database
The local Cortex database is corrupted. Please contact the EMOTIV customer support.
-32124 Subject not found
You are trying to update or delete a subject that doesn't exist. Or you are trying to create a record with an invalid subject.
-32125 Subject already exists
You are trying to create a subject, but another subject with the same name already exists.
-32126 The record session is running
The app can get this error if you call exportRecord on a running record. Please make sure the app calls stopRecord before exportRecord.
-32127 Profile already loaded for this headset
You are trying to load a training profile for a headset, but a profile was already loaded for this headset before. You must unload the current profile before loading a new one.
-32129 Invalid record title
You are trying to create or update a record, but the record title is invalid. The title must be 200 characters long or less.
-32130 Cloud token is being refreshed
If the Cortex API needs to work with the Emotiv Cloud (e.g: authorize API), the app can get this issue when the cloud token is being refreshed. The app should wait until the token is refreshed and try the API call again.
-32135 Cortex token with incorrect application id or version
The Cortex token is valid, however, the app has already authorized with different application credentials or same application but different version. The app needs to call authorize again.
In this case, there is often a bug in your application.
-32137 Cannot open output file
You are trying to export a record but Cortex cannot open the output CSV or EDF file to write. Users should check the path or the permissions.
-32138 Stream not supported for export
You are trying to export a record but one of the data streams you requested is not available.
-32139 Record is too short to export
When export to EDF file, the record length must be at least one second of data.
-32140 Cannot unsubscribe a data stream
The app can get this error when calling unsubscribe a data stream. Please check if the stream has been subscribed.
-32142 Unpublished application
By default, the app is unpublished and can only be used by the owner of the app. If the owner of the app wants to share the app with other people, the owner needs to contact EMOTIV customer support to publish the app.
-32146 A record is being reported
We don't allow a record to be exported twice at the same time. You must wait for a record exporting to stop before calling exportRecord on this record again.
-32147 Record data is corrupted
Record data is corruped and cannot be exported.
-32148 Timestamp of record is incorrect
There is something wrong with start and end time of the record and we cannot find the these timestamps in record data file. In this case, we cannot export the record.
-32151 Cannot run Cortex on this machine
If Cortex cannot read hardware information of the machine, you will get this error when calling authorize API.
-32152 Headset is not ready yet
When a headset is requested to connect, it will take some time for Cortex to establish the connection and getting the first sample. If the app wants to do anything with headset e.g: createSession, subscribe, etc, before that, the app will get this error. In this case, the app needs to wait and retry later.
-32153 Low disk space
The app will get this error when trying to connect a headset when the free disk space on this machine is critical low. Users will need to create more disk space to continue.
-32154 Invalid headset connection type
The app will get this error when trying to connect a headset with an expected connection type but the headset is not available via that connection type.
-32155 Opt-out feature is unavailable
The opt-out feature is not available with the current license. You can get this error when calling configOptout API. Please contact EMOTIV customer support if you want to have the ability of record uploading opt-out.
-32156 Cannot change Opt-out config
The opt-out feature is available with the current license. However, you cannot change the opt-out option. You can get this error when calling configOptout API. Please contact EMOTIV customer support if you want to have the ability of changing opt-out option.
-32157 Cannot change headset mapping
You cannot change the headset mapping of a connected headset.
-32159 Cannot upgrading database
You will not likely get this error. However, if you get it, there must be something wrong with the database. Please contact EMOTIV customer support.
-32160 Record data is corrupted after post-processing
You cannot export the record because when running post-processing, record data is corrupted for some reason. Please contact EMOTIV customer support for this case.
-32161 Record is being post-processing
You cannot export the record because when record's post-processing is in progress. Please wait until it's done.
-32173 The API is not supported for this application/platform/headset
You can get this error if the API is not supported in some cases.
For example, when the app is trying to run facial expression detection on a headset which doesn't support facial expression detection.
-32175 Database is busy
You will get this error when the API call is trying to access to database but the database is busy with other operations. Please wait and try again.
-32176 Cannot change headset config
You can get this error when calling updateHeadset API. Please make sure the headset connection is stable.
-32178 Cannot update headband position
You can get this error when calling updateHeadsetCustomInfo API but there is an active recording with this current headset.
-32179 Local time error
You cannot work with headset if your local time is modified and different from actual time. If you got this error, please check the Date Time settings on your machine.
-32182 Multi headset error
On some platforms like iOS, Android, Raspberry Pi, we support only 1 headset at a time. So if the app connects to the another headset while there is already connected headset, this error will be returned.
-32183 The account has been suspended
If users attempt to login at least 5 times with incorrect user credentials, the account will be suspended for 15 minutes and the app will get this error.
-32186 Record data already exists
When the app calls requestToDownloadRecordData but record data already exists, no need to download, the app will get this error.
-32188 Invalid authentication code
Only available for the Cortex embedded lib, related API: loginWithAuthenticationCode.
-32189 Expired authentication code
Only available for the Cortex embedded lib, related API: loginWithAuthenticationCode.
-32191 Cannot open database
This error can happen when there is some disk I/O error, e.g: users unplug the disk where Cortex's database is located.
-32192 Cannot encrypt database
Cortex cannot generate encryption key to encrypt database. Please contact EMOTIV customer support for this case.
-32193 Unhandled database error
There are unhandled errors in database. Please contact EMOTIV customer support for this case.
-32198 Re-generating database key
Cortex is trying to re-generating database key. This can happen when we rotate database key. Please wait and try again.
-32200 Cannot access records of other applications
Normally the app can only access the records that have been created by this app, unless it has the license key that record is created with. If the app doesn't have permission to access the record, it will get this error when calling these APIs: queryRecords, exportRecord, getRecordInfos.
-32206 Headset not supported
The headset is not supported for some feature. e.g: updateHeadset API.
-32225 Forced logout
Cortex log the user out because some critical account availability for example: user has changed their password or user has deleted their account.
-32226 Training profile incompatible with the headset
If the defined EEG channels in the training profile is not the same with the EEG channels of this headset, you will get this error. See setupProfile API.
-32227 Training profile incompatible with the EMOTIV Flex headset
If the training profile is loaded with EMOTIV Flex headset which doesn't have Epoc-based mapping, you will get this error. See setupProfile API.
-32228 Readonly training profile
The profile is ready and cannot be trained. Read more at readonly profile.
-32230 Unsupported headset in license
Emotiv licenses also limits the type of headset for specific data streams, especially 'eeg' or 'met' (see subscribe API). If you got this issue, please contact EMOTIV customer support.
-32232 License requires EEG
You will get this error if your app has enabled "Enable EEG for Professional devices" option when creating the app, however, you don't have any valid paid license.

This option should be enabled when you have Professional devices (EPOC, Flex) and want to access Premium data stream (EEG, high-resolution Performance Metrics). Please contact EMOTIV customer support in this case.
Otherwise, please create another Cortex app with new client id and client secret, disable this option then run again.
Last updated