Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

264
Views
¿Cómo obtener access_token usando el token de actualización de Ebay?

Estoy tratando de obtener access_token de un token de actualización que obtuve de eBay. Estoy usando Axios, pero sigo recibiendo el tipo de concesión en el error de solicitud no admitida .

 const refreshToken = 'xxxxxxxx'; const appID = 'xxxxxxx'; const certID = 'xxxxxx'; const scopes = [ 'https://api.ebay.com/oauth/api_scope', 'https://api.ebay.com/oauth/api_scope/sell.fulfillment', 'https://api.ebay.com/oauth/api_scope/sell.account', 'https://api.ebay.com/oauth/api_scope/sell.inventory' ] const params = { grant_type: 'refresh_token', refresh_token: refreshToken, 'scope': encodeURI(scopes.join(" ")), // scope: scopes, const token = Buffer.from(`${appID}:${certID}`); const URL = 'https://api.ebay.com/identity/v1/oauth2/token' const { data } = await axios.post(URL, params, { 'headers': { 'Authorization': `Basic ${token.toString('base64')}`, 'Content-Type': 'application/x-www-form-urlencoded', }, })
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Resulta que tendrá que UriEncode todo el cuerpo de la solicitud, utilizando querystring.encode() del nodo:

 const qs = require("querystring") ... const { data } = await axios.post(URL, qs.encode(params), { 'headers': { 'Authorization': `Basic ${token.toString('base64')}`, 'Content-Type': 'application/x-www-form-urlencoded', }, })
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!