Comments (6)
Anyone knows how to fix this ???
from selling-partner-api.
For now, just pass any value as the lwaRefreshToken
configuration parameter -- shouldn't matter what the value is. I'm working on a fix for this, but it won't be released for a while.
from selling-partner-api.
@jlevers Thank you for the awesome work on this library!
I seem to be having the same issue here. I am unable to use getAuthorizationCode, I get the following error:
Client error: `POST https://api.amazon.com/auth/o2/token` resulted in a `400 Bad Request` response: {"error_description":"The request has an invalid grant parameter : refresh_token","error":"invalid_grant"}
Below is my code snipet if you have any ideas I appreciate it!
"lwaClientId" => env('LWA_CLIENT_ID'),
"lwaClientSecret" => env('LWA_CLIENT_SECRET'),
"lwaRefreshToken" => "NotNeeded",
"awsAccessKeyId" => env('AMAZON_ACCESS_KEY_ID'),
"awsSecretAccessKey" => env('AMAZON_SECRET_ACCESS_KEY'),
"endpoint" => Endpoint::NA, // or another endpoint from lib/Endpoints.php
"roleArn" => env('SPAPI_ROLE_ARN'),
]);
$apiInstance = new AuthorizationApi($config);
$selling_partner_id = "<SellerId>";
$developer_id = env('AMAZON_DEVELOPER_ID');
$mws_auth_token = "<MWS AUTH Token.>";
try {
$result = $apiInstance->getAuthorizationCode($selling_partner_id, $developer_id, $mws_auth_token);
dd($result);
} catch (Exception $e) {
echo 'Exception when calling AuthorizationApi->getAuthorizationCode: ', $e->getMessage(), PHP_EOL;
}
from selling-partner-api.
I also tried with "lwaRefreshToken" => ""
Which gives error:
Client error: `POST https://api.amazon.com/auth/o2/token` resulted in a `400 Bad Request` response: {"error_description":"The request is missing a required parameter : refresh_token","error":"invalid_request"}
from selling-partner-api.
This should be resolved in v3.1.1
, which I just released. Sorry that this took a while to get to!
from selling-partner-api.
@jlevers I am still getting these same error messages on the newest release 4.0.2
if I leave lwaRefreshToken blank I get
{"error_description":"The request is missing a required parameter : refresh_token","error":"invalid_request"}
If I remove lwaRefreshToken from my Configuration then I get
lwaRefreshToken must be specified when calling non-grantless API operations
Here is my config I am using:
$config = new Configuration([
"lwaClientId" => env('LWA_CLIENT_ID'),
"lwaClientSecret" => env('LWA_CLIENT_SECRET'),
// "lwaRefreshToken" => '',
"awsAccessKeyId" => env('AMAZON_ACCESS_KEY_ID'),
"awsSecretAccessKey" => env('AMAZON_SECRET_ACCESS_KEY'),
"endpoint" => Endpoint::NA, // or another endpoint from lib/Endpoints.php
"roleArn" => env('SPAPI_ROLE_ARN'),
"accessToken" => null,
]);
What am I missing here?
Any help is GREATLY appreciated!
from selling-partner-api.
Related Issues (20)
- Moving to V6 HOT 2
- getOrder - Dto not working HOT 3
- Issue with getMyFeesEstimateForSKU - listingPrice instead of ListingPrice HOT 2
- Issue with V6 shipServiceLevel/shipmentServiceLevelCategory always returning Standard HOT 1
- Calling getReportDocument() Returns 400 Error with Invalid Report Document ID HOT 11
- sdk version HOT 1
- Missing model fields for the Shipping API on v6
- Using my own Guzzle Client in V6 HOT 2
- ListingsItemPatchRequest error on updating price HOT 1
- Please update "illuminate/support" package to support laravel 11. HOT 5
- Unable to use multiple clients in a single application HOT 4
- Migration to v6 HOT 2
- Issue with productFees - case mismatch in GetMyFeesEstimateRequest HOT 9
- Incorrect php version requirements HOT 1
- searchCatalogItems returns a 403 Forbidden response
- Class "Crescat\SaloonSdkGenerator\BaseDto" not found HOT 3
- Invoice Upload: NotImplemented HOT 5
- createFeedDocument Error 400 on Endpoint::NA_SANDBOX HOT 6
- How to Update the Version HOT 1
- Is API for Fulfillment Inbound API v2024-03-20 available?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from selling-partner-api.