loginWithAuthenticationCode
This method is to log in into Cortex with an authentication code. You can use the method getUserLogin to know if a user is already logged in or not.
To get an authentication code, you must call the native function CortexClient.authenticate (Objective-C, Java)
Parameters
Name
Type
Required
Description
clientId
string
yes
The client ID of your application.
clientSecret
string
yes
The client secret of your application.
code
string
yes
An authentication code.
Result
The result is an object with these fields:
Name
Type
Description
username
string
The EmotivID of the user.
message
string
Example
{
"id": 1,
"jsonrpc": "2.0",
"method": "login",
"params": {
"clientId": "xxx",
"clientSecret": "yyy",
"code": "zzz"
}
}{
"id": 1,
"jsonrpc": "2.0",
"result": {
"message": "User jon.snow login successfully",
"username": "jon.snow"
}
}Last updated