{"id":1650,"date":"2022-08-19T13:54:02","date_gmt":"2022-08-19T13:54:02","guid":{"rendered":"https:\/\/pheonixsolutions.com\/knowledge-base\/?p=1650"},"modified":"2026-06-08T16:10:34","modified_gmt":"2026-06-08T16:10:34","slug":"how-to-create-an-api-token-for-a-cpanel-user","status":"publish","type":"post","link":"https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/08\/19\/how-to-create-an-api-token-for-a-cpanel-user\/","title":{"rendered":"How to create an API token for a cPanel user"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n\n\n\n<p>This guide explains how to generate an API token for an individual cPanel account. The generated token inherits the same permissions and access level as the cPanel user that created it, allowing authenticated access to cPanel API functions without using the account password.<\/p>\n\n\n\n<p>If you need an API token with customized permissions or restricted access, refer to the documentation linked in the <strong>Additional Resources<\/strong> section.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Generate an API Token via the cPanel Interface<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Log in to cPanel using the desired cPanel account.<\/li>\n\n\n\n<li>Navigate to <strong>Manage API Tokens<\/strong>.<\/li>\n\n\n\n<li>In the <strong>Token Name<\/strong> field, enter a descriptive name for the token. This name is used for identification purposes only and can be any value that helps you recognize its intended use.<\/li>\n\n\n\n<li>Choose an expiration date for the token, or leave the expiration setting disabled if you do not want the token to expire automatically.<\/li>\n\n\n\n<li>Click <strong>Create<\/strong>.<\/li>\n\n\n\n<li>Copy the generated API token and store it in a secure location.<\/li>\n<\/ol>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p><strong>Important:<\/strong> The token value is displayed only once. If it is lost, you will need to revoke the token and create a new one.<\/p>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\">Generate an API Token via SSH or Terminal<\/h2>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p><strong>Note:<\/strong> This method is currently affected by a known issue and may not function as expected. You can follow updates on the defect using the link provided in the <strong>Additional Resources<\/strong> section.<\/p>\n\n\n\n<p><strong>Known Issue:<\/strong> <code>UAPI - Tokens::create_full_access requires root access<\/code><\/p>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\">Create a Token Without an Expiration Date<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Log in to the server via SSH as the cPanel user, or open the <strong>Terminal<\/strong> interface within cPanel.<\/li>\n\n\n\n<li>Run the following command, replacing the username and token name with your own values:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>uapi --user=username Tokens create_full_access name='exampleToken'\n<\/code><\/pre>\n\n\n\n<ol start=\"3\" class=\"wp-block-list\">\n<li>Copy the generated token and store it securely.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">Create a Token With an Expiration Date<\/h3>\n\n\n\n<p>To create a token that expires after 24 hours, first generate a future Unix epoch timestamp:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>twentyFourHoursFromNow=$(date +%s -d \"$(date) + 24 Hours\")\n<\/code><\/pre>\n\n\n\n<p>Then create the token using the expiration timestamp:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>uapi --user=username Tokens create_full_access \\\n  name='exampleToken' \\\n  expires_at=$twentyFourHoursFromNow\n<\/code><\/pre>\n\n\n\n<p>After the command completes, copy the returned token and store it in a secure location.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Security Recommendations<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Store API tokens securely and treat them like passwords.<\/li>\n\n\n\n<li>Use expiration dates whenever possible.<\/li>\n\n\n\n<li>Revoke tokens that are no longer needed.<\/li>\n\n\n\n<li>Never share API tokens through email, chat, or other unsecured communication channels.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Additional Resources<\/h2>\n\n\n\n<p>Known Issue: <code>Tokens::create_full_access requires root access<\/code><\/p>\n\n\n\n<p>cPanel API Token Documentation<\/p>\n\n\n\n<p>UAPI Tokens Module Documentation<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>API tokens provide a secure and convenient way to authenticate cPanel API requests without exposing your account password. Whether generated through the cPanel interface or via command-line tools, API tokens allow applications, scripts, and integrations to interact with cPanel using the permissions assigned to the account that created them.<\/p>\n\n\n\n<p>To maintain account security, store tokens securely, use expiration dates when appropriate, and regularly review and revoke any tokens that are no longer required.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction This guide explains how to generate an API token for an individual cPanel account. The generated token inherits the same permissions and access level as the cPanel user that created it, allowing authenticated access to cPanel API functions without using the account password. If you need an API token with customized permissions or restricted ..<\/p>\n<div class=\"clear-fix\"><\/div>\n<p><a href=\"https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/08\/19\/how-to-create-an-api-token-for-a-cpanel-user\/\" title=\"read more...\">Read more<\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[33],"tags":[5],"class_list":["post-1650","post","type-post","status-publish","format-standard","hentry","category-whm","tag-cpanel"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to create an API token for a cPanel user - PheonixSolutions Knowledge-Base<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/08\/19\/how-to-create-an-api-token-for-a-cpanel-user\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to create an API token for a cPanel user - PheonixSolutions Knowledge-Base\" \/>\n<meta property=\"og:description\" content=\"Introduction This guide explains how to generate an API token for an individual cPanel account. The generated token inherits the same permissions and access level as the cPanel user that created it, allowing authenticated access to cPanel API functions without using the account password. If you need an API token with customized permissions or restricted ..Read more\" \/>\n<meta property=\"og:url\" content=\"https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/08\/19\/how-to-create-an-api-token-for-a-cpanel-user\/\" \/>\n<meta property=\"og:site_name\" content=\"PheonixSolutions Knowledge-Base\" \/>\n<meta property=\"article:published_time\" content=\"2022-08-19T13:54:02+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-06-08T16:10:34+00:00\" \/>\n<meta name=\"author\" content=\"vijender\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"vijender\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2022\\\/08\\\/19\\\/how-to-create-an-api-token-for-a-cpanel-user\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2022\\\/08\\\/19\\\/how-to-create-an-api-token-for-a-cpanel-user\\\/\"},\"author\":{\"name\":\"vijender\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/#\\\/schema\\\/person\\\/7e483f3adf4e0c18f959adcaf9ea3f3d\"},\"headline\":\"How to create an API token for a cPanel user\",\"datePublished\":\"2022-08-19T13:54:02+00:00\",\"dateModified\":\"2026-06-08T16:10:34+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2022\\\/08\\\/19\\\/how-to-create-an-api-token-for-a-cpanel-user\\\/\"},\"wordCount\":446,\"commentCount\":0,\"keywords\":[\"cPanel\"],\"articleSection\":[\"WHM\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2022\\\/08\\\/19\\\/how-to-create-an-api-token-for-a-cpanel-user\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2022\\\/08\\\/19\\\/how-to-create-an-api-token-for-a-cpanel-user\\\/\",\"url\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2022\\\/08\\\/19\\\/how-to-create-an-api-token-for-a-cpanel-user\\\/\",\"name\":\"How to create an API token for a cPanel user - PheonixSolutions Knowledge-Base\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/#website\"},\"datePublished\":\"2022-08-19T13:54:02+00:00\",\"dateModified\":\"2026-06-08T16:10:34+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/#\\\/schema\\\/person\\\/7e483f3adf4e0c18f959adcaf9ea3f3d\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2022\\\/08\\\/19\\\/how-to-create-an-api-token-for-a-cpanel-user\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2022\\\/08\\\/19\\\/how-to-create-an-api-token-for-a-cpanel-user\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2022\\\/08\\\/19\\\/how-to-create-an-api-token-for-a-cpanel-user\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to create an API token for a cPanel user\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/#website\",\"url\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/\",\"name\":\"PheonixSolutions Knowledge-Base\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/#\\\/schema\\\/person\\\/7e483f3adf4e0c18f959adcaf9ea3f3d\",\"name\":\"vijender\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/29c5aebbdf439bbeaeea52d1cf1a0166768889fd6238deb28b6851eebb2cfb32?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/29c5aebbdf439bbeaeea52d1cf1a0166768889fd6238deb28b6851eebb2cfb32?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/29c5aebbdf439bbeaeea52d1cf1a0166768889fd6238deb28b6851eebb2cfb32?s=96&d=mm&r=g\",\"caption\":\"vijender\"},\"url\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/author\\\/vijender\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to create an API token for a cPanel user - PheonixSolutions Knowledge-Base","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/08\/19\/how-to-create-an-api-token-for-a-cpanel-user\/","og_locale":"en_US","og_type":"article","og_title":"How to create an API token for a cPanel user - PheonixSolutions Knowledge-Base","og_description":"Introduction This guide explains how to generate an API token for an individual cPanel account. The generated token inherits the same permissions and access level as the cPanel user that created it, allowing authenticated access to cPanel API functions without using the account password. If you need an API token with customized permissions or restricted ..Read more","og_url":"https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/08\/19\/how-to-create-an-api-token-for-a-cpanel-user\/","og_site_name":"PheonixSolutions Knowledge-Base","article_published_time":"2022-08-19T13:54:02+00:00","article_modified_time":"2026-06-08T16:10:34+00:00","author":"vijender","twitter_card":"summary_large_image","twitter_misc":{"Written by":"vijender","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/08\/19\/how-to-create-an-api-token-for-a-cpanel-user\/#article","isPartOf":{"@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/08\/19\/how-to-create-an-api-token-for-a-cpanel-user\/"},"author":{"name":"vijender","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/#\/schema\/person\/7e483f3adf4e0c18f959adcaf9ea3f3d"},"headline":"How to create an API token for a cPanel user","datePublished":"2022-08-19T13:54:02+00:00","dateModified":"2026-06-08T16:10:34+00:00","mainEntityOfPage":{"@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/08\/19\/how-to-create-an-api-token-for-a-cpanel-user\/"},"wordCount":446,"commentCount":0,"keywords":["cPanel"],"articleSection":["WHM"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/08\/19\/how-to-create-an-api-token-for-a-cpanel-user\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/08\/19\/how-to-create-an-api-token-for-a-cpanel-user\/","url":"https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/08\/19\/how-to-create-an-api-token-for-a-cpanel-user\/","name":"How to create an API token for a cPanel user - PheonixSolutions Knowledge-Base","isPartOf":{"@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/#website"},"datePublished":"2022-08-19T13:54:02+00:00","dateModified":"2026-06-08T16:10:34+00:00","author":{"@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/#\/schema\/person\/7e483f3adf4e0c18f959adcaf9ea3f3d"},"breadcrumb":{"@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/08\/19\/how-to-create-an-api-token-for-a-cpanel-user\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/08\/19\/how-to-create-an-api-token-for-a-cpanel-user\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/08\/19\/how-to-create-an-api-token-for-a-cpanel-user\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/pheonixsolutions.com\/knowledge-base\/"},{"@type":"ListItem","position":2,"name":"How to create an API token for a cPanel user"}]},{"@type":"WebSite","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/#website","url":"https:\/\/pheonixsolutions.com\/knowledge-base\/","name":"PheonixSolutions Knowledge-Base","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/pheonixsolutions.com\/knowledge-base\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/#\/schema\/person\/7e483f3adf4e0c18f959adcaf9ea3f3d","name":"vijender","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/29c5aebbdf439bbeaeea52d1cf1a0166768889fd6238deb28b6851eebb2cfb32?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/29c5aebbdf439bbeaeea52d1cf1a0166768889fd6238deb28b6851eebb2cfb32?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/29c5aebbdf439bbeaeea52d1cf1a0166768889fd6238deb28b6851eebb2cfb32?s=96&d=mm&r=g","caption":"vijender"},"url":"https:\/\/pheonixsolutions.com\/knowledge-base\/author\/vijender\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/posts\/1650","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/comments?post=1650"}],"version-history":[{"count":2,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/posts\/1650\/revisions"}],"predecessor-version":[{"id":3767,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/posts\/1650\/revisions\/3767"}],"wp:attachment":[{"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/media?parent=1650"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/categories?post=1650"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/tags?post=1650"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}