How to validate an Api key?

Our customer is reporting that their api requests are failing and are concerned that their API key may have expired. Do these keys expire and where would I look to see if one has expired?

Answers

  • Alex Wong
    Alex Wong Community All-Star
    Tenth Anniversary Kudos 5 Facilitator 4 bbcon 2025 Attendee Badge

    "api key" is vague, you will need to investigate your customer's error.

    • Subscription Key (primary and secondary) - this does not expire, unless the developer manually regenerate
    • Application ID (also Client ID) - once application is created, this ID is final and cannot be changed
    • Application Secret (also Client Secret, there is primary and secondary) - this also does not expire, unless the developer manually regenerate
    • Authorization Token - this is what is required to make API call, which is obtained from "user login authorization flow" - this DOES expire, and can only be used for 60 minutes.
    • Refresh Token - this is obtained at the same time you receive the Authorization Token. This can use used in the "Refresh access token flow" in order to receive a new Authorization Token for use - this ALSO expire, but can be used for 365 days, and more importantly, the 365 days can be "pushed" out every time you do a refresh, so in a sense, this token does not really expires if API is used normally.

Categories