I am working with ebay API's. i have connectd Sandbox account and its working fine. But when i want to connect PRODUCTION then it give me error (request is missing a required parameter or malformed). i don't understand where is the problem. 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' => $consent_token,
'redirect_uri' => xxx.....
]
]);
if ($response) {
$data = json_decode($response->getBody()->getContents());
return $data;
}
I expected response will be :
{ "access_token": "v^1.1#i^1#p^3#r^1...XzMjRV4xMjg0", "expires_in": 7200, "refresh_token": "v^1.1#i^1#p^3#r^1...zYjRV4xMjg0", "refresh_token_expires_in": 47304000, "token_type": "User Access Token" }