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
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 |
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 login | string | yes | ‘request’ |
object.objectType | ObjectType represents the user | string | yes | ‘user’ |
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 | |
context.notificationType | Notification type | string | yes | ‘confirm_register’ |
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’ |
Response examples
Response: confirmation sent successfully
Parameter | Description | Type |
---|---|---|
result.status | HTTP status code | integer |
content.objectType | ObjectType represents identifier | string |
content.displayName | Identifier type where notification is sent | string |
content.value | Identifier value where notification is sent | string |
Response: confirmation not sent because user does not exists
Parameter | Description | Type |
---|---|---|
result.status | HTTP status code | int |
result.errors | Struct for errors | array |
result.errors[].message | Error message | string |
Response: confirmation not sent because user already confirmed
Parameter | Description | Type |
---|---|---|
result.status | HTTP status code | int |
result.errors | Struct for errors | array |
result.errors[].message | Error message | string |
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) |
404 | Error | Not found: user is not found so notification could not be sent |
409 | Error | Conflict: User is already confirmed |
500 | Error | Internal Server Error: The server encountered an unexpected condition which prevented it from fulfilling the request |
502 | Error | Bad gateway: error releasing notification in the subyacent notification service |
200 | Success | Notification sent to user successfully |