Preface
This article describes some Authlete APIs for retrieving, changing and revoking authorization granted for a client by a user. They would be useful in some use cases, for example:- A user logs in to an API provider (authorization server) website and checks what clients he or she has granted access
- An API provider deletes tokens for a particular client as per request from a user

1. Obtaining a list of clients that have tokens granted by a user
/client/authorization/get/list API provides a list of clients which have been authorized a certain user (i.e. which have had tokens granted by the user).Request
A request will be made using either GET or POST.Response
Successful response
JSON including the following parameters is provided with status code 200.Failed response
The following JSON object is provided with status code 400, 403, 500 etc.Example
- Request
- Response
2. Updating scopes of authorizations (tokens) for a client by a user
/client/authorization/update API allows an authorization server to update scopes of tokens for a single client, which have been granted by a certain user.Request
A request will be made using POST. Its URL includes clientId.- If a non-null value is given, the new scopes are set to all existing access tokens
- If an API call is made using “Content-Type: application/x-www-form-urlencoded”, scope names listed in this request parameter should be delimited by spaces (after form encoding, spaces are converted to ’+’) |
Response
JSON including the following parameters is provided with status code 200, 400, 403, 500 etc.Example
- Request
- Response
Revoking authorization for one of clients which have been authorized by a user
/client/authorization/delete API allows authorization server to revoke tokens by specifying both a client and a user.Request
A request will be made using either DELETE or POST. Its URL includes clientId.Response
JSON including the following parameters is provided with status code 200, 400, 403, 500 etc.Example
- Request
- Response