Skip to content
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

Use Oauth2 token in trading API #34

Open
ipengli opened this issue Jun 3, 2020 · 1 comment
Open

Use Oauth2 token in trading API #34

ipengli opened this issue Jun 3, 2020 · 1 comment

Comments

@ipengli
Copy link

ipengli commented Jun 3, 2020

Seems the trading API in the package is using AuthNAuth token. Is there a way we can use Oauth2 token here? eBay seems require X-EBAY-API-IAF-TOKEN in the header, any chance we can add it to the header when sending out the request? Any idea appreciated!

@akiraro
Copy link

akiraro commented Jan 6, 2021

I think there is no method or API available to set the request header, but what you could do is to modify the eBayMethod.js file and add the headers to support Ouath2

            var options = {headers: objectAssign(opts.headers, spec.headers)};
            options.headers['X-EBAY-API-IAF-TOKEN'] = '<your user oauth2>'
            options.useBody = spec.useBody || false;
            options.authorization = spec.authorization || '';
            options.contentType = spec.contentType || '';

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants