Connecting to API from remote server issue

Websup2019

Registered
Oct 4, 2019
1
0
1
Santiago de Chile
cPanel Access Level
Root Administrator
Hi, I hope you are well.
I am writing to you because I have a problem, I am creating a system to create new subdomains and I need to connect to the cpanel for everything related to the subdomain and database.

My first question is that the API 2 option does not appear in the "API SHELL" option, I would like to know how I can "Update" this option and understand how to configure it, since I did the following and this is the results, which They make me understand that I can connect.

Result from WHM:
"{"data":{"cp_security_token":"/cpsessXXXXXXXXXX","session":"xxxxx:pKL3oHouL97wS4Nx:create_user_session,XXXXXXXXXXXXXXXXXXXXXX","url":"https://xxxxxxx.coml:2083/cpsess5XX...ate_user_session%XXXXXXXXXXXXXXXXXXXXXXXXXXee","service":"cpaneld","expires":1570217444},"metadata":{"reason":"Created session","version":1,"command":"create_user_session","result":1}}"



Now, from my application, the following error comes out and I can't find a way to access it.

Thank you
 

Attachments

cPanelTJ

Product Owner
Staff member
Jan 29, 2019
89
43
93
Houston, TX
cPanel Access Level
Root Administrator
Twitter
Hi, Websup2019. I'm happy to answer your questions, but could use a little more information first. Would you mind sharing an example snippet of your code? What method of API authentication are you using? We recommend using API Tokens in WHM.

If the "API 2" version you are referring to is the version listed in the error from your screenshot, this is a known bug that we hope to solve soon.