User Login
const url = 'https://api.exolink.cloud/auth/login';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"username":"hello@example.com","password":"example","invitation":"example","session":"example","code":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.exolink.cloud/auth/login \ --header 'Content-Type: application/json' \ --data '{ "username": "hello@example.com", "password": "example", "invitation": "example", "session": "example", "code": "example" }'Authenticate user, confirm multi-factor authentication and return access tokens. With MFA enabled the first call returns an MFA challenge; repeat the call with its session and the TOTP code.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Example generated
{ "username": "hello@example.com", "password": "example", "invitation": "example", "session": "example", "code": "example"}Responses
Section titled “Responses”Login successful, or MFA challenge
object
Authentication tokens
object
JWT access token for API requests
Token for refreshing access tokens
Expiry of the access token, in seconds since the epoch
object
Unique identifier for the user (UUID)
User’s email address
User’s first name
User’s last name
User’s language
User permissions per tenant (tenant domain prefix -> role mapping)
object
User role in a tenant
Time of authentication, in seconds since the epoch
User settings with the state of the default tenant. Empty when the user has no tenant.
object
First CPMS of the default tenant
object
Whether the default tenant has chargers
WebSocket URLs of the default tenant’s fully configured custom domains
object
Default tenant domain prefix
WebSocket connection URL of the default tenant
Discovery state of the default tenant. Empty when the user has no tenant.
object
Profile of the active discovery
1 while a discovery is active
Duration of the active discovery in hours
Subscriptions of the default tenant
object
Returned instead of tokens when the user has to pass multi-factor authentication
object
Always empty
object
Pass as session together with the TOTP code to /auth/login
Example
{ "UserInfo": { "locale": "en", "perms": { "additionalProperty": "Owner" } }, "Settings": { "language": "en", "region": "DE", "timezone": "Europe/Berlin", "default": { "connectUrl": "wss://abc123.broker.exolink.cloud/" } }, "Provision": { "mode": 0 }}Missing, invalid or expired credentials
Error response. Some rejections carry only message.
object
Error message
Error code
Failed validations, for requests checked against a schema
object
Path of the invalid field
Example
{ "message": "Not authorized", "errorCode": "ERR_API_NOT_AUTHORIZED"}Resource is not in a state that allows this request
Error response. Some rejections carry only message.
object
Error message
Error code
Failed validations, for requests checked against a schema
object
Path of the invalid field
Example
{ "message": "Lab '3' is in pending state and can not be deleted yet", "errorCode": "ERR_API_UNEXPECTED_STATE"}Validation or verification failed
Error response. Some rejections carry only message.
object
Error message
Error code
Failed validations, for requests checked against a schema
object
Path of the invalid field
Example
{ "message": "Missing parameter: displayName", "errorCode": "ERR_API_VALIDATION_FAILED"}