Commit Client Secret Rotation
POST
clients/{id}/secret:commit
Commit the client secret rotation. This must be called after Prepare Client Secret Rotation to activate the new client secret.
If there is no prepared client secret ready, or the new client secret does not match, an attempt to commit will fail with a 409 status.
Resource Information
| Method and URI | POST https://developer.api.autodesk.com/applications/v1/clients/{id}/secret:commit |
| Authentication Context | App only |
| Required OAuth Scopes | application:client:rotate_secret |
| Data Format | JSON |
Request
Headers
| Authorization* string | Must be Bearer <token>, where <token> is a two-legged access token obtained via a Client Credentials Grant flow. |
| Content-Type* string | Must be application/json |
* Required
Request
URI Parameters
| id string | The client ID of the application you are committing the secret for.
Note: An application can only rotate its own client secret. It cannot rotate the client secret of another application. |
Request
Body Structure
| clientAssertion* string | A JWT signed by the application. The assertion must be signed by one of the keys published at the application’s JWKS URI. The supported signature algorithms are ES256, ES384, ES512, PS256, PS384, and PS512. The JWKS URI can be configured on https://aps.autodesk.com/myapps.
The JWT must contain the following claims:
|
| newSecret* string | The new client secret. This secret must match the client secret returned by Prepare Client Secret Rotation.
Max length: 200 |
* Required
Response
HTTP Status Code Summary
| 200 OK | Successfully committed the new client secret. |
| 400 Bad Request | Malformed request. The request body is not valid. See response for details. |
| 401 Unauthorized | The request did not have a valid access token. Obtain a fresh access token and try again. |
| 403 Forbidden | You do not have permission to perform the operation specified by the request. |
| 404 Not Found | Not Found |
| 409 Conflict | No prepared client secret ready or new client secret does not match. |
Example
Successfully committed the new client secret.
Request
curl -v 'https://developer.api.autodesk.com/applications/v1/clients/:id/secret:commit' \
-X 'POST' \
-H 'Authorization: Bearer AuIPTf4KYLTYGVnOHQ0cuolwCW2a' \
-H 'Content-Type: application/json' \
-d '{
"clientAssertion": "eyJ...",
"newSecret": "EsJi82aOhMfBAjia"
}'
Show More
Response
{}