Closed machineghost closed 4 years ago
@machineghost Thanks for using this library. Below code is working for me
const Ebay = require('ebay-node-api');
const clientID = '--- sandbox client id ---';
const clientSecret = '--- sandbox client secret---';
const body = {
grant_type: 'client_credentials',
scope: 'https://api.ebay.com/oauth/api_scope'
};
const env = 'SANDBOX';
const ebay = new Ebay({ body, clientID, clientSecret, env });
(async () => {
const token = await ebay.getAccessToken();
console.log(token);
})();
Try using this code. If it's still not working, make sure that you are using sandbox client id and secret key ?.
Let me know if you need any help.
Thanks a bunch for the response. I think I got confused ang got a "web services auth token", which is not the same as an API token (why they have both is beyond me). I signed up for the developer program (separately) and am now waiting for access to that, which should (hopefully) give me working credentials.
I'll let you know if that doesn't work, but hopefully it will. Thanks again.
Cool thanks 👍
When I try to follow the basic example I can't even get past
getAccessToken
:When I run the above, I get an error of "invalid_client", with a description of "client authentication failed". However, I'm copy/pasting my exact EBay account SID/auth token, so unless I'm using the wrong auth variables (the only other ones EBay gives me are the read-only ones) I'm not sure what I could be doing wrong.
Any thoughts?