Description
You have to call this method when the user ask for remembering his password. If the process it’s done successfully the user will receive a notification with a code and link to reset the current password and change it by a new one. The notification is sent by mail or sms (depending on the principal id defined with this app and entry point).
You can use method Reset password process to allow user to insert code in your application and allow to reset password.
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 |
Query string parameters
Parameter | Description | Type | Required |
---|---|---|---|
state | An opaque value used by the app to maintain state between the request and callback. | string | 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 | ‘reset_password’ |
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
Reponse: notification sent
Parameter | Description | Type |
---|---|---|
result.status | http status code | integer |
content.displayName | Identifier type where notification is sent | string |
content.value | Identifier value where notification is sent | string |
Response: user account not confirmed
Parameter | Description | Type |
---|---|---|
content | Data receive with the response | struct |
content.url | Redirect url to notify the user how to confirm the account | string |
result.status | HTTP status code | int |
result.errors | Struct for errors | array |
result.errors[].message | Error message | string |
Response KO: user not found
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 |
412 | Error | Precondition failed: can not send notification to user because user is not confirmed |
500 | Error | Internal Server Error: The server encountered an unexpected condition which prevented it from fulfilling the request |
502 | Error | Bad Gateway: notification service is nor working fine so notification can not be sent |
200 | Success | Notification sent to user successfully |