Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

API Token length

Discussion in 'General Discussion' started by jimlongo, Jun 8, 2018.

Tags:
  1. jimlongo

    jimlongo Well-Known Member

    Joined:
    Mar 20, 2008
    Messages:
    221
    Likes Received:
    13
    Trophy Points:
    68
    i'm writing a shell script to install a module. the module requires an token. Wanted to do some validation on input.

    Are API Tokens always 32 characters in length?
     
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,384
    Likes Received:
    1,951
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello @jimlongo,

    Yes, API tokens are always 32 characters in length.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. jimlongo

    jimlongo Well-Known Member

    Joined:
    Mar 20, 2008
    Messages:
    221
    Likes Received:
    13
    Trophy Points:
    68
    Thank you.

    Is there any further validation I can do?

    A function that verifies the token . . . or is it always alphanumeric (no special characters)? Anything at all to make sure they presented the correct value.
     
  4. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,384
    Likes Received:
    1,951
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello @jimlongo,

    It's always 32 characters, alphanumeric, and the letters are capitalized.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice