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:
    193
    Likes Received:
    7
    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 Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,659
    Likes Received:
    1,787
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    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:
    193
    Likes Received:
    7
    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 Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,659
    Likes Received:
    1,787
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    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