Description

To update a Multi-Factor Authentication (MFA) channel in your DruID account, utilize this method.

It’s essential to have a user logged in with an access token. This operation cannot be performed without an authenticated user. Prior to proceeding, familiarize yourself with OAuth2 APIs to understand the OAuth2 protocol and the significance of each token.

Upon successfully updating the MFA channel, confirmation is required by sending a valid code through the validate code endpoint.

Endpoint URL:

 POST https://{your-endpoint-domain.com}/activityid/v1/mfa/update

Request parameters

ParameterDescriptionTypeRequired
Authorization“Bearer access_token” Literal text Bearer followed by access_token that is the user access token obtained from /oauth2/token endpointstringyes
Content-TypeThe type of content that will be used for requests to be JSONstringyes
AcceptThe type of content that will be used for responses to be JSONstringyes
FromName of the entry pointstringyes
Accept-LanguageLanguage for this requestLocaleno

Query string parameters

Request Example

ParameterDescriptionTypeRequiredValue
actor.idobject_id of the logged userstringyesuser id
actor.objectTypeType of the object which represents the actor.stringyes‘person’
verbVerb used for updating the MFA channelstringyes‘update’
object.objectTypeObjectType represents the userstringyes‘user’
object.passwordPassword of the user. it must be send plainstringyesuser password
source.idType of device doing the activitystringyes‘unknown’ | ‘pc’ | ‘mobile’ | ‘tablet’ | ‘game_console’ | ‘itv’
source.objectTypeType of sourcestringyes‘device’
context.mfa_channelName of the MFA channelstringyes‘sms’
context
.mfa_channel_address
Address where to send the TOTP code. For instance, a phone number if the channel is SMSstringno‘+34123123123’

Response examples

Response: MFA Updated Channel

ParameterDescriptionType
contentData receive with the responsestruct
content.providerThe provider that generates the TOTP codes.string
content.isMandatoryWhether the MFA has been created with mandatory scopestring
content.channelThe name of the channel that has been configured.string
content.secretSecret shared with the user, this secret would be used as a seed for generating the TOTP codes. This is the code that is commonly requested in the authentication apps if the QR code is not available. string
content.qrUriThe “otpauth” complete URI representing the MFA channel.string
content.printableQrUri
The “content.qrUri” but encoded to be printed in html. You can print it with by pasting this property in the “src” on an “img” tag` long
resultCommon http resultstruct
result.statusHttp codeinteger
result.messageA description that describes the result of the operationstring

Response codes

CodeTypeDescription
400ErrorBad Request: The request could not be understood by the server due to malformed syntax
401ErrorUnauthorized: authentication is required and has failed or has not yet been provided (token is invalid, etc)
417ErrorMFA Error: There is a problem with MFA, you will receive a detailed error description
500ErrorInternal Server Error: The server encountered an unexpected condition which prevented it from fulfilling the request
504ErrorGateway TimeoutService can not contact with oauth server to do some internal operations
200SuccessMFA code updated succesfully