Last active
May 26, 2019 14:01
-
-
Save sm-a/32f48e7b9170902dec5c3156c8a533d4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const axios = require("axios"); | |
axios.request({ | |
url: "/identity/v1/oauth2/token", | |
method: "POST", | |
baseURL: "https://api.sandbox.ebay.com/", | |
auth: { | |
username: "", // eBay client id | |
password: "" // eBay client secret | |
}, | |
headers: { 'content-type': 'application/x-www-form-urlencoded' }, | |
data: { | |
"grant_type": "client_credentials", | |
"scope": "https://api.ebay.com/oauth/api_scope" | |
} | |
}).then(res => { | |
console.log(res); | |
}).catch(error => { | |
console.log(error) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment