Description
You have to call this method when you want to provide with a reset password URL that you can send within your emails, allowing to confirm DRUID users aside from standard emails.
Please read https://dru-id.com/developers/apis/oauth-2/ to learn about Oauth2 protocol and the meaning of each token.
Some considerations to take into account:
• URL is unique per user, therefor you have to call this method for every single user.
As a result, you will get a URL that you can use within your emails. This way, when a user clicks it, he will be redirected to DRUID reset password page and will also be redirected to your defined callback. This will give you full control of what you need (redirect user to another page or wherever you need).
Endpoint URL:
POST https://{your-endpoint-domain.com}/activityid/v1/notification/give
Request headers
Header | 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 | application/json | string | yes |
Accept | application/json | string | yes |
From | entrypoint id | string | yes |
Accept-Language | Language for this request | Locale | no |
Query string parameters
Parameter | Description | Type | Required | Default value |
---|
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 | ‘access’ |
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’ |
Response examples
Response: url for reset password
Parameter | Description | Type |
---|---|---|
content | Data receive with the response | url |
result.status | http status code | integer |
Response: User does not exists
Parameter | Description | Type |
---|---|---|
result.status | http status code | integer |
result.elapsed | Time spent to receive the response | integer |
errors | Response errors | struct |
errors.message | Errors message | string |
errors.details | Errors detail | string |
Parameter | Description | Type |
---|---|---|
result.status | http status code | integer |
result.elapsed | Time spent to receive the response | integer |
errors | Response errors | struct |
errors.message | Errors message | string |
errors.details | Errors detail | 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) |
409 | Error | The request could not be completed due to a conflict with the current state of the target resource. |
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 |
200 | Success | request success |