Closed klachhab closed 4 years ago
same issue with me :(
I am also stuck here. After I go to 01-get-app-token.php I get an app token, And the I hit 02-get-user-token.php then it say this ->
[error] => invalid_request
[error_description] => request is missing a required parameter or malformed.
*** I tried this small edit ***
$service = new Services\OAuthService([
'credentials' => $config['production']['credentials'],
'ruName' => $config['production']['ruName'],
'sandbox' => false,
]);
$token = $config['production']['testtoken'];
/**
* Create the request object.
*/
$request = new Types\GetUserTokenRestRequest();
$request->code = $token;
/**
* Send the request.
*/
$response = $service->getUserToken($request);
echo '<pre>';
print_r($response);
echo '<pre>';
exit;
Once I tried to put the recently fetched token on $request->code . Nothing changed. Can you help me go through it ? Thanks
The Grant Code is sent back from Ebay when the user gives permission for the application to have access to their account.
As soon as they hit "Accept", a Grant Code is added to the redirect URL you setup in your Ebay account. It is added to the URL as a GET parameter.
My advice is to store this code in a $_SESSION
variable and then when you get to the [get-user-token.php] script, you can use this as the $request->code
value
Worked for me. Hope this helps!
When i execute the file the browser displays this error message : Status Code: 400 invalid_grant: the provided authorization grant code is invalid or was issued to another client
How can i find the grant code ?
Please help