Description
To authenticate a Time-based One-Time Password (TOTP) code for Multi-Factor Authentication (MFA), utilize this method. Following code validation, the method attempts login, thus the endpoint’s response mirrors that of the login process.
Endpoint URL:
POST https://{your-endpoint-domain.com}/activityid/v1/mfa/approve
Request parameters
Parameter | Description | Type | Required |
---|---|---|---|
Authorization | “Bearer app_token” Literal text Bearer followed by app_token that is the token obtained from /oauth2/token endpoint | string | yes |
Content-Type | The type of content that will be used for requests to be JSON | string | yes |
Accept | The type of content that will be used for responses to be JSON | string | yes |
From | Name of the entry point | string | yes |
Accept-Language | Language for this request | Locale | no |
Query string parameters
Parameter | Description | Type | Required | Default value |
---|---|---|---|---|
sc | With this paramater you can configure how user fields are validated: by default ALL validation errors are returned back to service caller (). If you want to receive only ONE validation error each time, you have to send query String parameter ‘sc=true’ | boolean | no | false |
fca | Force to check complete account after successful login. If user needs to complete data you will receive same response defined in complete account error each time, you have to send query String parameter ‘sc=true’ | boolean | no | false |
Request Example
Parameter | Description | Type | Required | Value |
---|---|---|---|---|
actor.id | app_id of the application you are using to log user | string | yes | app id |
actor.objectType | Type of the object which represents the actor. | string | yes | ‘application’ |
verb | Verb used for the code validation | string | yes | ‘approve’ |
object.objectType | ObjectType represents the user | string | yes | ‘user’ |
object.password | Password of the user. it must be send plain | string | yes | user password |
object.ids.email | Structure of email identifier. node name must be “email” | struct | yes | |
object.ids .email.objectType | ObjectType represents the id of the user | string | yes | ‘user_id’ |
object.ids.email.value | Email value | string | yes | |
source.id | Type of device doing the activity | string | yes | ‘unknown’ | ‘pc’ | ‘mobile’ | ‘tablet’ | ‘game_console’ | ‘itv’ |
source.objectType | Type of source | string | yes | ‘device’ |
context.mfa_code | The TOPT for being validated. | string | yes | ‘123456’ |
Response examples
Response: MFA Code Validated
Response codes
Code | Type | Description |
---|---|---|
400 | Error | Bad Request: The request could not be understood by the server due to malformed syntax |
401 | Error | Unauthorized: authentication is required and has failed or has not yet been provided (token is invalid, etc) |
403 | Error | Forbidden: user id or password are invalid |
412 | Error | Precondition failed: User can not log because he/she has not confirmed email |
417 | Error | MFA Error: There is a problem with MFA, you will receive a detailed error description |
500 | Error | Internal Server Error: The server encountered an unexpected condition which prevented it from fulfilling the request |
504 | Error | Gateway TimeoutService can not contact with oauth server to do some internal operations |
2xx | Success | Code validated successfully, see login response. |