Connection from integromat to cpanel API with API Tokens
Hi all,
How are you?
I'm a newbie and i'm trying to connect my cpanel to integromat.
Is there someone in the group that did a connection to cpanel API with API Tokens?
https://api.docs.cpanel.net/.../operation/get_disk_usage/
I tired doing it with https request - but instead of the expected result I'm getting the login page HTML code.
Can someone help?
Thanks!
-
Hi @cPRex, Thanks for your reply. Sadly I don't know how to run the curl command directly. Should I use it with CMD and just add the command? The username:APITOKEN should be username:APITOKEN or my Cpanel username:APITOKEN ? When I'm already logged in to my cpanel I can run the command directly from the web browser without using APITOKEN without a problem problem: 0 -
Great - so at least that indicates the command is working well. Your user may not have command line access, so you may not have that option on your side. It would be the cPanel username of your account, which looks like it could be "shira" from the output you provided. 0 -
Yes - the command is working well when using it via the browser and while logged in to cpanel. The problem is when I'm trying to use the API with APITOKEN via integromat. I tried using a online curl tool like that Run Curl Commands Online and I get the same problem: Also when running it I'm getting this error: Any I deas? Thanks! 0 -
I was doing to say, there needs to be a space after the "-H" portion of the command. I'm glad at least that portion is working, although I don't have much advice for the Integromat side of things, unfortunately. 0 -
In integromat I can send HTTP requests and select: The URL, Method (GET / POST etc.), Headers, Query String, Body type (application/x-www-form-urlencoded or RAW or multipart/form-data) and the Fields of the body. Any I dea how can I convert the CURL command to each part? Thanks!! 0 -
Unfortunately I don't - that's more of a developer question. Does that application offer any support you could take advantage of to see if they could implement that option? 0 -
Dear @cPRex Thanks for your help. The solution was to add everything as one value in the header instead of 2. So instead of having Authorization: cpanel and another one of username:token I used: Authorization in the Value field and cpanel username:token in the Name filed. Now it's working. Thanks for your help! 0 -
I'm glad that's working well now! 0
Please sign in to leave a comment.
Comments
10 comments