Rajib Hossain Pavel
Rajib Hossain Pavel

Reputation: 437

GuzzleHTTP Response 400 Status

I have been using GuzzleHttp and here is my code snippet and this appears to manage Session in GuzzleHTTP somehow.

    $this->httpMethod=='GET';
    if(!empty($this->httpMethod) && $this->httpMethod=='POST'){
        $response = $this->client->post($finalUrl);
    }else{
        $response = $this->client->request($this->httpMethod, $finalUrl);
    }

Unfortunately, I am getting this Fatal Error-

Fatal error: Uncaught GuzzleHttp\Exception\ClientException: Client error: `GET https://creator.zoho.com/api/json/test/view/All_SMS?zc_ownername=zc_owner&raw=1&authtoken=auth_token&scope=crmapi` resulted in a `400 Bad Request` response:
{"code":2945,"message":"DATATYPE_NOT_MATCHED"}

Upvotes: 0

Views: 160

Answers (1)

jstur
jstur

Reputation: 689

Review the Zoho API error codes.

Code 2945 is an invalid ticket.

Without studying the API documentation in depth, I suspect it is an authentication problem.

Upvotes: 1

Related Questions