Open ghost opened 3 years ago
@kamajigames You need to give a filepath to your config.json.
Like this -
const EbayAuthToken = require('ebay-oauth-nodejs-client');
const ebayAuthToken = new EbayAuthToken({
filePath: 'demo/eBayJson.json' // input file path.
})
Although not depicted in the example code, the "env" configuration parameter ('PRODUCTION' or 'SANDBOX') is required along with clientId, clientSecret, and redirectUri. If it's not specified, the module defaults to "PRODUCTION" which is why it won't work with the sandbox environment.
@kamajigames have you got the resolution? I am still stuck with the same issue
@kamajigames have you got the resolution? I am still stuck with the same issue
Like @NFNChris mentioned try adding "env" to your EbayAuthToken like so:
const ebayAuthToken = new EbayAuthToken({
clientId: '',
clientSecret: '',
redirectUri: '',
env: 'SANDBOX', // (or PRODUCTION)
});
I added clarification on this issue to the Readme, hoping to make it more explicit. I cannot create a pull request as I am not a collaborator. The clarification can be found here.
Hi there,
When attempting to fetch a token using the sandbox environment, the lib throws an error:
Code I'm using w/ my sandbox creds: