API Token Length

Are API tokens always the same length? I’d like to validate user input of API tokens before attempting to authenticate, and wanted to make sure of this before I attempt it. Thanks!

Hi @mmcnabb

Yes, the API tokens are always 42 characters in length. You can use a regular expression like the following to match them ^00[a-zA-Z0-9\-\_]{40}$ .

1 Like

Thanks, that’s exactly what I was looking to do!