Post

1 follower Follow
0
Avatar

403 Forbidden when sent API request via Guzzle client but curl works fine

When I sent API request https://apie1.clarizen.com/v2.0/services/authentication/login via Guzzle client I get Client error: `POST https://apie1.clarizen.com/v2.0/services/authentication/login` resulted in a `403 Forbidden`, in the same time I don't have problems with curl client. I tried to debug guzzle request:

> POST /v2.0/services/authentication/login HTTP/1.1
Content-Type: application/json
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,q=0.8
Accept-Encoding: gzip, deflate, br
User-Agent: GuzzleHttp/6.2.1 curl/7.35.0 PHP/7.0.32-1+ubuntu14.04.1+deb.sury.org+1
Host: apie1.clarizen.com
Content-Length: 58

* upload completely sent off: 58 out of 58 bytes
< HTTP/1.1 403 Forbidden
* Server AkamaiGHost is not blacklisted
< Server: AkamaiGHost
< Mime-Version: 1.0
< Content-Type: text/html
< Content-Length: 317
< Expires: Thu, 24 Mar 2022 20:14:39 GMT
< Date: Thu, 24 Mar 2022 20:14:39 GMT
< Connection: close

* Closing connection 0

Are there any required header for post request?

Liliia Bolshak

Please sign in to leave a comment.