Need help with API …
 
Notifications
Clear all

[Solved] Need help with API call

2 Posts
2 Users
1 Reactions
6,380 Views
0
Topic starter

Hello!

I’m trying to make a call to API on demo site, but all requests result in 303 response:

curl 'https://cpdemo.compsyscloud.com/CloudPanel/company/test/users?ApiKey=iXZxR4Q6J3GUTV9l01uzGaxVPPg7oDMphF8x5WDsidsy8w4wYFCgx3oLeEx7wz6ONA+xSAYIpG6xthveqwt+ow==' -H 'Accept: application/json' -v

* Trying 192.48.138.21...
* TCP_NODELAY set
* Connected to cpdemo.compsyscloud.com (192.48.138.21) port 443 (#0)
* TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
* Server certificate: *.compsyscloud.com
* Server certificate: COMODO RSA Domain Validation Secure Server CA
* Server certificate: COMODO RSA Certification Authority
> GET /CloudPanel/company/test/users?ApiKey=iXZxR4Q6J3GUTV9l01uzGaxVPPg7oDMphF8x5WDsidsy8w4wYFCgx3oLeEx7wz6ONA+xSAYIpG6xthveqwt+ow== HTTP/1.1
> Host: cpdemo.compsyscloud.com
> User-Agent: curl/7.51.0
> Accept: application/json
>
< HTTP/1.1 303 See Other
< Cache-Control: private
< Transfer-Encoding: chunked
< Content-Type: text/html
< Location: /CloudPanel/?returnUrl=/CloudPanel/company/test/users%3fApiKey%3diXZxR4Q6J3GUTV9l01uzGaxVPPg7oDMphF8x5WDsidsy8w4wYFCgx3oLeEx7wz6ONA%2bxSAYIpG6xthveqwt%2bow%3d%3d
< Server: Microsoft-IIS/8.5
< Access-Control-Allow-Origin: *
< Access-Control-Allow-Methods: POST,GET,DELETE,PUT,OPTIONS
< Access-Control-Allow-Headers: Accept, Origin, Content-type
< X-AspNet-Version: 4.0.30319
< X-Powered-By: ASP.NET
< Date: Thu, 13 Jul 2017 20:26:10 GMT
<
* Curl_http_done: called premature == 0
* Connection #0 to host cpdemo.compsyscloud.com left intact
KMI Support 2017-07-13 14:33

It looks like it is not authenticating you. I would try removing the plus (+) from the Key because the logs are showing a space.

1 Answer
1
Topic starter

Yep, the key was not encoded. My bad) Thanks for help!

Share: