Add User's External Tokens
Learn about the API operation to add an external token to a user.
Request Type | POST |
URL | /oauth/users/{userID}/externalTokens |
Parameters | JSON array of a new external
token:
Note: If the user already has a token with such
systemId , then an exception will be
thrown. |
Access | Access ROLE_ADMIN_TENANT or ROLE_USER
and the same user |
Request
curl -k -H
"Accept: application/json" -H
"Content-Type: application/json
" -H
"Authorization: Bearer 5925f793-c092-43ec-b3a3-65ce8e194448" -X
POST -d
'[{
"systemId" : "facebook",
"value" : "2452-25215-52152-dsgsd-gdsg"
"attributes" : {
"valid_till" : "21421"
}
}]'
http://localhost:8080/oauth/users/lee_eybe/externalTokens
Response
[{
"systemId" : "facebook",
"value" : "2452-25215-52152-dsgsd-gdsg"
"attributes" : {
"valid_till" : "21421"
}
}]