Description

You have to call this method when you want to send to user another confirmation code, because user is not yet confirmed his account in DRUID. Normally, you had to call the login service, and receive a response that indicates that user is not yet confirmed. You can allow the user to request another confirmation notification through this method.

Please, read first https://dru-id.com/developers/apis/oauth-2/ to learn about Oauth2 protocol and the meaning of each token.

Endpoint URL:

 POST https://{your-endpoint-domain.com}/activityid/v1/notification/request

Request parameters

ParameterDescriptionTypeRequired
Authorization“Bearer app_token” Literal text Bearer followed by app_token that is the 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

Request example

ParameterDescriptionTypeRequiredValue
actor.idapp_id of the application you are using to log userstringyesapp id
actor.objectTypeType of the object which represents the actorstringyes‘application’
verbVerb used for the loginstringyes‘request’
object.objectTypeObjectType represents the userstringyes‘user’
object.ids.emailStructure of email identifier. node name must be “email”structyesemail
object.ids.email.objectTypeObjectType represents the id of the userstringyes‘user_id’
object.ids.email.valueEmail valuestringyesemail
context.notificationTypeNotification typestringyes‘confirm_register’
source.idType of device doing the activitystringyes‘unknown’ | ‘pc’ | ‘mobile’ | ‘tablet’ | ‘game_console’ | ‘itv’
source.objectTypeType of sourcestringyes‘device’

Response examples

Response: confirmation sent successfully

ParameterDescriptionType
result.statusHTTP status codeinteger
content.objectTypeObjectType represents identifierstring
content.displayNameIdentifier type where notification is sentstring
content.valueIdentifier value where notification is sentstring

Response: confirmation not sent because user does not exists

ParameterDescriptionType
result.statusHTTP status codeint
result.errorsStruct for errorsarray
result.errors[].messageError messagestring

Response: confirmation not sent because user already confirmed

ParameterDescriptionType
result.statusHTTP status codeint
result.errorsStruct for errorsarray
result.errors[].messageError messagestring

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)
404ErrorNot found: user is not found so notification could not be sent
409ErrorConflict: User is already confirmed
500ErrorInternal Server Error: The server encountered an unexpected condition which prevented it from fulfilling the request
502ErrorBad gateway: error releasing notification in the subyacent notification service
200SuccessNotification sent to user successfully