webhooks/v1/tokens/@me
Replaces an existing secret token with a new one.
Note that there can be a delay of up to 10 minutes while the change takes effect. We recommend that your callback accept both secret token values for a period of time to allow all requests to go through.
The webhooks affected by this operation are determined by the type of access token you use.
- Two-legged Access Token: Sets the secret token for all webhooks owned by calling the app.
- Three-legged Access Token: Sets the secret token for all webhooks owned by the calling user
Note: Use the Update Webhook operation to set a token for a specific webhook.
See the Secret Token section in API Basics for more information.
Resource Information
| Method and URI | |
| Authentication Context | User context optional |
| Required OAuth Scopes | data:read data:write |
| 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, or a three-legged access token obtained via an Authorization Code flow or a Secure Service Account (SSA) flow.
The SSA flow is designed for headless server-to-server operations. While it functions like a two-legged flow (no user interaction), it is classified as three-legged because it preserves user context. |
| region string | The geographical location (region) of the server the request must be executed on. This also corresponds to the region where Webhook data is stored. It is also the location of the server that will make requests to your callback URL. Possible values:
Note: You can specify the region using three methods: the |
| x-ads-region string | The geographical location (region) of the server the request must be executed on. This also corresponds to the region where Webhook data is stored. It is also the location of the server that will make requests to your callback URL. Possible values:
Note: You can specify the region using three methods: the |
| Content-Type* string | Must be application/json |
Request
Query String Parameters
| region enum:string | The geographical location (region) of the server the request must be executed on. This also corresponds to the region where Webhook data is stored. It is also the location of the server that will make request to your callback URL. Possible values:
Note: You can specify the region using three methods: the |
Request
Body Structure
| token* string | The new secret to set. |
Response
HTTP Status Code Summary
| 204 No Content | The secret change request was accepted. |
| 400 Bad Request | The request could not be processed due to invalid or malformed data. Check the request parameters, body format, and required fields before retrying. |
| 401 Unauthorized | The supplied authorization header was invalid or the token scope was not acceptable. Verify your authentication credentials and try again. |
| 403 Forbidden | The request was valid but lacked the necessary permissions. Verify your credentials and permissions before sending the request again. |
| 404 Not Found | The requested resource could not be found on the server. Review the request and try again. |
| 500 Internal Server Error | An unexpected error occurred on the server. Please try again later. |
Response
Body Structure (204)
Response for 204 has no body.
Example
This example demonstrates how to update a secret token.
Request
curl -X 'PUT'\
-v 'https://developer.api.autodesk.com/webhooks/v1/tokens/@me'\
-H 'Content-Type: application/json'\
-H 'authorization: Bearer eyJhbGciOiJIUzI1NiIsImtpZCI6Imp3dF9zeW1tZX'\
-d '{
"token":"awffbvdb3trf4fvdfbUyt39suHnbe5Mnrks1"
}'
Response
HTTP/1.1 204
Date: Fri, 15 Sep 2017 19:11:00 GMT
Content-Length: 0
Connection: keep-alive