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}$ .

2 Likes

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

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.