Is there a defined format for API keys?

  • 1
  • Question
  • Updated 5 years ago

Is there a defined format of the API key? E.g. the length of the key? I'm writing a library that accesses the API and wish to be able to validate the developer provided key is a real one before trying to access the API.


Photo of lloydjatkinson


  • 1 Post
  • 0 Reply Likes

Posted 5 years ago

  • 1
Photo of afelicioni


  • 227 Posts
  • 43 Reply Likes
The key is a 16 digits hexadecimal string in lowercase; don't know if a part contains some sort of checksum, neither no method to check for key validity is available, so may be needed to hit a known query and test for wanted response (but consuming an api call).

A simple regular expression could just validate it, like the following