Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

SolaimanAhmed's avatar

Ebay Connection fail in Production (request is missing a required parameter or malformed)

Hi, I am working with eBay APIs. I have connected a Sandbox account, and it's working fine. But when I attempt to connect to PRODUCTION, it gives me an error (request is missing a required parameter or malformed). I don't understand where the problem lies. My code is here:

$response = $client->request('POST', "https://api.ebay.com/identity/v1/oauth2/token", [ 'headers' => [ 'content-type' => 'application/x-www-form-urlencoded', 'Authorization' => $this->getBasicAuthorizationHeader() ], 'form_params' => [ 'grant_type' => 'authorization_code', 'code' => xxxx...., 'redirect_uri' => xxx..... ] ]);

        if ($response) {
            $data = json_decode($response->getBody()->getContents());
           	return $data;
        }
0 likes
0 replies

Please or to participate in this conversation.