Request

Response

    Update Secret Token
    PUT

    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:
    • US - (Default) Data center dedicated to serve the United States region.
    • EMEA - Data center dedicated to serve the European Union, Middle East, and Africa regions.
    • AUS - Data center dedicated to serve the Australia region.
    • CAN - Data center dedicated to serve the Canada region.
    • DEU - Data center dedicated to serve the Germany region.
    • IND - Data center dedicated to serve the India region.
    • JPN - Data center dedicated to serve the Japan region.
    • GBR - Data center dedicated to serve the United Kingdom region.

    Note: You can specify the region using three methods: the region header, the x-ads-region header, and the region query parameter. The region header takes precedence over the x-ads-region header, and the x-ads-region header takes precedence over the region query parameter.

    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:
    • US - (Default) Data center dedicated to serve the United States region.
    • EMEA - Data center dedicated to serve the European Union, Middle East, and Africa regions.
    • AUS - Data center dedicated to serve the Australia region.
    • CAN - Data center dedicated to serve the Canada region.
    • DEU - Data center dedicated to serve the Germany region.
    • IND - Data center dedicated to serve the India region.
    • JPN - Data center dedicated to serve the Japan region.
    • GBR - Data center dedicated to serve the United Kingdom region.

    Note: You can specify the region using three methods: the region header, the x-ads-region header, and the region query parameter. The region header takes precedence over the x-ads-region header, and the x-ads-region header takes precedence over the region query parameter.

    Content-Type*
    string
    Must be application/json
    * Required

    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:
    • US - (Default) Data center dedicated to serve the United States region.
    • EMEA - Data center dedicated to serve the European Union, Middle East, and Africa regions.
    • AUS - Data center dedicated to serve the Australia region.
    • CAN - Data center dedicated to serve the Canada region.
    • DEU - Data center dedicated to serve the Germany region.
    • IND - Data center dedicated to serve the India region.
    • JPN - Data center dedicated to serve the Japan region.
    • GBR - Data center dedicated to serve the United Kingdom region.

    Note: You can specify the region using three methods: the region header, the x-ads-region header, and the region query parameter. The region header takes precedence over the x-ads-region header, and the x-ads-region header takes precedence over the region query parameter.

    Request

    Body Structure

    token*
    string
    The new secret to set.
    * Required

    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