kunnusingh

Member
Mar 23, 2010
18
4
53
Front of PC
cPanel Access Level
Root Administrator
i started integration of APi in my project

- 1. Create Account

https://documentation.cpanel.net/display/SDK/WHM+API+1+Functions+-+createacct


Code:
https://hostname.example.com:2087/cpsess##########/json-api/createacct?api.version=1&username=user&domain=example.com&plan=package_name&featurelist=default&quota=0&password=12345luggage&ip=n&cgi=1&hasshell=1&contactemail=user%40seconddomain.com&cpmod=paper_lantern&maxftp=5&maxsql=5&maxpop=10&maxlst=5&maxsub=1&maxpark=1&maxaddon=1&bwlimit=500&language=en&useregns=1&hasuseregns=1&reseller=0&forcedns=1&mailbox_format=mdbox&mxcheck=local&max_email_per_hour=500&max_defer_fail_percentage=80&owner=root


can you please tell me about this parameter what we have to put in place of cpsess########## so i can integrated successfully


please help me
 
Last edited by a moderator:

ChrisI

Technical Analyst II
Mar 24, 2014
67
12
83
cPanel Access Level
Root Administrator

kunnusingh

Member
Mar 23, 2010
18
4
53
Front of PC
cPanel Access Level
Root Administrator
Hello!

The cpsess part of the URL will normally show when you are logged into cPanel in the URL. If you are adding that into a script or application, you will likely want to use an API Token instead. This shows how to set those up.

Guide to API Authentication - API Tokens - Software Development Kit - cPanel Documentation

You can generate those tokens under Manage API Tokens in WHM.

Manage API Tokens - Version 64 Documentation - cPanel Documentation

Thanks!

This links does not describe what we have to put in place of cpsess########## in script?