{"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":"2022-08-19T17:15:25","modified_gmt":"2022-08-19T17:15:25","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<h3 class=\"wp-block-heading\">Introduction<\/h3>\n\n\n\n<p>The following guide explains the methods that can be used to generate an API token that is specific to an individual cPanel user.<\/p>\n\n\n\n<p>The resulting token will be limited to the same access as the cPanel account that it was created for.<\/p>\n\n\n\n<p>It is also possible to generate a token with customized permissions. If you&#8217;re looking for that functionality instead, links for that process are included in the &#8220;Additional Resources&#8221; section at the end of this article.<\/p>\n\n\n\n<p>Via the cPanel UI<\/p>\n\n\n\n<p>1. Login to cPanel as the desired cPanel user<\/p>\n\n\n\n<p>2. Click on the &#8220;Manage API Tokens&#8221; icon<\/p>\n\n\n\n<p>3. Enter a name for the API token. The name is arbitrary and is only to help you remember what the API token is being used for.<\/p>\n\n\n\n<p>4. Select an expiration, or leave it without an expiration<\/p>\n\n\n\n<p>5. Click the blue Create button<\/p>\n\n\n\n<p>6. Copy your token to a safe place<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Via SSH or Terminal<\/h3>\n\n\n\n<p>NOTE: This method does not currently work due to the following defect. You may use the &#8220;follow&#8221; button at the link below to get updates when the issue is resolved:<\/p>\n\n\n\n<p><a href=\"https:\/\/support.cpanel.net\/hc\/en-us\/articles\/1500011415682-UAPI-Tokens-create-full-access-requires-root-access?utm_source=zendesk&amp;utm_medium=deflarticles&amp;utm_campaign=interdefllink\" target=\"_blank\" rel=\"noreferrer noopener\">UAPI &#8211; Tokens::create_full_access requires root access<\/a><\/p>\n\n\n\n<p>1. Login to SSH as the cPanel user or access the Terminal icon from cPanel<\/p>\n\n\n\n<p>2. Issue the following command and be sure to update the username and token name to your own values:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>uapi --user=austtynw Tokens create_full_access name='exampleToken<\/strong>'<\/pre>\n\n\n\n<p>If you want to set an expiration date you can do so by specifying a future date in Epoch time:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">twentyFourHoursFromNow=$(date +%s -d \"$(date) + 24 Hours\")\n<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">uapi --user=austtynw Tokens create_full_access name='exampleToken' expires_at=$twentyFourHoursFromNow\n<\/pre>\n\n\n\n<p>3. Copy the resulting token to a safe place<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction The following guide explains the methods that can be used to generate an API token that is specific to an individual cPanel user. The resulting token will be limited to the same access as the cPanel account that it was created for. It is also possible to generate a token with customized permissions. If ..<\/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_memberships_contains_paid_content":false,"footnotes":""},"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.4 - 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 The following guide explains the methods that can be used to generate an API token that is specific to an individual cPanel user. The resulting token will be limited to the same access as the cPanel account that it was created for. It is also possible to generate a token with customized permissions. If ..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=\"2022-08-19T17:15:25+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\":\"2022-08-19T17:15:25+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2022\\\/08\\\/19\\\/how-to-create-an-api-token-for-a-cpanel-user\\\/\"},\"wordCount\":258,\"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\":\"2022-08-19T17:15:25+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 The following guide explains the methods that can be used to generate an API token that is specific to an individual cPanel user. The resulting token will be limited to the same access as the cPanel account that it was created for. It is also possible to generate a token with customized permissions. If ..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":"2022-08-19T17:15:25+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":"2022-08-19T17:15:25+00:00","mainEntityOfPage":{"@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/08\/19\/how-to-create-an-api-token-for-a-cpanel-user\/"},"wordCount":258,"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":"2022-08-19T17:15:25+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":1,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/posts\/1650\/revisions"}],"predecessor-version":[{"id":1651,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/posts\/1650\/revisions\/1651"}],"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}]}}