Login – Auth
Description
To get the authorization token for the IoT Platform REST API.
The following flow enables you to obtain the required authentication token to log in:
This Login request is sent with the required request parameters.
IoT Platform ’s Authentication Provider validates the credentials that were supplied.
For valid credentials, one of the following responses is returned, depending on whether or not the MFA mechanism is enabled:
MFA Not Enabled ‒ A status code of 200 OK is returned in the response, as described below. The API client can use the authorization token to use the IoT Platform REST API endpoints. The following shows the login response when all login request parameters are satisfactory:
{
[DataMember(Name = “token”)]
public string Token { get; set; }
[DataMember(Name = “name”)]
public string UserName;
[DataMember(Name = “redirectUrl”)]
public string RedirectUrl { get; set; }
}
MFA Enabled ‒ When valid login credentials are provided and MFA is enabled, this login response returns the status code Forbidden 403. In this case, the user must follow the flow described on page 194, in addition to the flow described above, to obtain the IoT Platform authentication token required for logging in.