Control Web Panel

Developers => Functions => Topic started by: Iz3k34l on July 12, 2019, 04:31:40 AM

Title: cURL API testing
Post by: Iz3k34l on July 12, 2019, 04:31:40 AM
i am wanting to create a script that will change a password for an email account. i am testing by simply trying to list users with cURL using this line
Code: [Select]
curl -d '{"MYKEY":"mYk3yh3r3","action":"list"}' -H "Content-Type: application/json" -X POST https://cwp.mydomain.com:2304/v1/accountdetail  but i get the error

Code: [Select]
{"status":"Error","msj":"error in key","format":"JSON"}
Thanks for your help
Title: Re: cURL API testing
Post by: josemnunez on July 12, 2019, 09:19:33 AM
Visit our documentation

https://docs.control-webpanel.com/docs/developer-tools/api-manager

Title: Re: cURL API testing
Post by: Iz3k34l on July 13, 2019, 03:33:47 AM
Quote from: josemnunez link=topic=7026.msg24397#msg24397 date=
Visit our documentation

https://docs.control-webpanel.com/docs/developer-tools/api-manager

Thank you now i get
Code: [Select]
{"status":"Error","msj":"Unauthorized action