API Platform Base Path: https://api.enterprise.apigee.com/v1/o/{org_name}
API Resource Path: /oauth2/accesstokens/{access_token}
Updates the access token attributes.
Verb: POST
Auth: Basic AuthContent Types:
application/json
text/xml
Updates the access token attributes. Can update attributes of Authorization Code and AccessToken Only attributes given in payload will be updated and the remaining existing attributes will remain intact.
Sample Request:$ curl -H "Content-type=application/json" -X POST -d \
'{"attributes" : [ {"name" : "InternalID","value" : "User452"} ],"scope" : "read"}' \
https://api.enterprise.apigee.com/v1/o/{org_name}/oauth2/accesstokens/{access_token}
Request Payload Elements:
| Name | Description | Default | Required? |
|---|---|---|---|
| attributes | Name/value pair used to extend the default access token profile | N/A | No |
| scope | A set of permissions defined for an API, used in the Oauth protocol | N/A | No |
{
"apiProducts" : [ "sandbox" ],
"app" : "app1",
"attributes" : [ {
"name" : "att_n1",
"value" : "att_v1"
} ],
"clientId" : "fGytmxA5UDajPMdOA5E3bebiBOBPikOT",
"createdAt" : 1343038476540,
"createdBy" : "defaultUser",
"expiresAt" : 1343040276540,
"grantType" : "password",
"issuedAt" : 1343038476540,
"lastModifiedAt" : 1343038476958,
"lastModifiedBy" : "defaultUser",
"refreshCount" : 0,
"refreshToken" : "1h11770Z",
"scope" : "read",
"status" : "approved",
"token" : "taFM3LHUTQAFhL0dIFg81XhRc7vC",
"tokenType" : "BearerToken"
}
Response Payload Elements:
| Name | Description |
|---|---|
| apiProducts | API products associated with this consumer key |
| app | App to which this key belongs |
| attributes | Name/value pairs used to extend the default profile |
| clientId | The id associated with the app end user |
| createdAt | Unix time when this access token was created |
| createdBy | User name of the Apigee user who created this access token |
| expiresAt | Unix time when this access token will expire |
| grantType | Grant type of the access token: auth code, client_credential, refresh token |
| issuedAt | Unix time when the token was issued |
| lastModifiedAt | Unix time when the token profile was last modified |
| lastModifiedAt | Unix time when the AccessToken was most recently updated (its attributes) |
| lastModifiedBy | Unix time when the token was last modified |
| refreshCount | Number of times the token may be refreshed |
| refreshToken | Value of the refresh token |
| scope | Scope associated with the token |
| status | Status of the access token |
| token | Value of the access token |
| tokenType | Type of OAuth token: bearer or HMAC |
Failure 404 with proper error message
<Error>
<Code>keymanagement.service.invalid_{entity}</Code>
<Message>Invalid Access Token</Message>
<Contexts/>
</Error>
Error Codes:
1. keymanagement.service.application_not_approved
2. keymanagement.service.invalid_access_token
3. keymanagement.service.access_token_update_failed
Last updated:
about 1 month ago