-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to perform getOrders / Error - Insufficient permissions to fulfill the request #79
Comments
We also using Express as Backend. I don't know what exactly is the error. Here is how we do the call, maybe it helps: const eBay = new eBayApi({
// ....
scope: [
'https://api.ebay.com/oauth/api_scope',
'https://api.ebay.com/oauth/api_scope/sell.marketing.readonly',
'https://api.ebay.com/oauth/api_scope/sell.marketing',
'https://api.ebay.com/oauth/api_scope/sell.inventory.readonly',
'https://api.ebay.com/oauth/api_scope/sell.inventory',
'https://api.ebay.com/oauth/api_scope/sell.account.readonly',
'https://api.ebay.com/oauth/api_scope/sell.account',
'https://api.ebay.com/oauth/api_scope/sell.fulfillment.readonly',
'https://api.ebay.com/oauth/api_scope/sell.fulfillment',
'https://api.ebay.com/oauth/api_scope/sell.analytics.readonly',
'https://api.ebay.com/oauth/api_scope/sell.finances',
'https://api.ebay.com/oauth/api_scope/sell.payment.dispute',
'https://api.ebay.com/oauth/api_scope/commerce.identity.readonly'
]
});
const token = await getFromDb(); // get the token that was created in the ebay sign in process
eBay.setCredentials(token);
// Listen to refresh token event, and update the token in the DB
eBay.OAuth2.on('refreshAuthToken', (token: any) => {
storeInDb(token).then(() => console.log('token is stored'))
});
eBay.sell.fulfillment.getOrders({
limit: 5
}).then(order => {
console.log('order', JSON.stringify(order, null, 2));
}).catch(e => {
console.error(JSON.stringify(e, null, 2));
}); Check if you always use the same scope for sign in and API request. Btw. You don't need to refresh it manually. It's done automatically. You can listen to the event and store the token (as shown in the example above) |
Thank you, it completely works now for me. In the end, it was passing in the original complete token object that solved it...
|
Hi I am having no success with the getOrders call.
Here's the auth scopes I'm using when setting the ORIGINAL User access token...:
Here's my code (ExpressJS backend controller method...):
Here's the error I get:
Even freshly minted User access tokens through those scopes get this error.
According to the ebay docs on getOrders, these are the required auth scopes for this call:
Upon further investigation, I found I am certainly using those scopes in the response (below is a snippet of the scopes grabbed from the larger ebay error)...
As shown above, I am clearly using the
sell.fulfillment
andsell.fulfillment.readonly
scopes so I do not understand what is the issue.How are you making your getOrders calls successfully?
UPDATE: I successfully made a getOrders call but did it using fetch (tho I rather use hendt/ebay-api) but here's the code which actually works for me now (until we could solve this)...
Getting this output from that...
The text was updated successfully, but these errors were encountered: