Login with userName
Authenticate a user using username and password.
https://api.nucle.cloud/v1/user/login/username
Request Header
Name | Type | Required | Description |
---|---|---|---|
ProjectId | string | True | The project id, available from the dashboard. |
Request Body
Name | Type | Required | Description |
---|---|---|---|
userName | string | True | The user userName. |
password | string | True | The user password. |
Response
Name | Type | Description |
---|---|---|
200 OK | object | Login result object. |
400 Bad Request | object | The outer wrapper for all responses with errors. |
Login result object
Name | Type | Description |
---|---|---|
userToken | string |
The user token, to be saved for future authenticated requests User Token life time can be customized in the dashboard, project settings. Defaults : Real user : 480 hours External login : 480 hours Anonymous user : 6 hours |
user | Object | The user object |
User Object
Name | Type | Description |
---|---|---|
id | string | The id of the user. |
userName | string | The user name of the user. |
displayName | string | The display name of the user. |
string | The email of the user. | |
creationDate | Date Time | The creation date of the user. |
lastLogin | Date Time | The last login activity date of the user. |
ip | string | The public ip of the user. |
city | string | the city of the user |
region | string | The region of the user |
country | string | The country of the user. |
latitude | string | The latitude coordinate of the user. |
longtitude | string | The lontitude coordinate of the user. |
Error Object
Name | Type | Description |
---|---|---|
code | int | Numerical HTTP code |
status | string | Description of the HTTP code. |
errorMessage | string | Description of the error |