Description
You should call this method after you have made a social login in DRUID and you are required to accept the Terms & Conditions. If you need to know which T&Cs are to be accepted, you can make a call to consult the information about the entrypoint, its fields and consents to be accepted. After that, use the access token of the social login and make the call.
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/assertions/social/accept
Request parameters
Parameter | Description | Type | Required |
---|---|---|---|
Authorization | Bearer ${access_token} Literal text Bearer followed by access_token that is the token for current logged user obtained from social login 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 of 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 | ‘accept’ |
object.objectType | ObjectType represents the user | string | yes | ‘user’ |
object.ids | User identifiers. More info about user identifiers User Info | struct | yes | struct |
object.assertions | Struct that defines legalities manage by the user. More info about user assertions User Info | struct | yes | struct |
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: terms accepted successfully
Response KO: Terms & Conditions not approved by the user
Parameter | Description | Type |
---|---|---|
content | Data receive with the response | struct |
content.assertions | List of assertions not completed by the user | array |
content.assertions.objectType | ObjectType represents the assertions list | ‘assertions’ |
content.assertions.items | List of assertions. More info about assertions at User Info | array |
result.status | HTTP status code | int |
errors.message | Errors description | 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) |
403 | Error | Forbidden: user id or password are invalid |
451 | Error | Unavailable For Legal Reasons: user must accept new terms and conditions |
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 | Sucess | User accept t&c conditions successfully. |