ebay refresh_token获取步骤解析

发布于 2023-05-04  498 次阅读


  • 访问ebay卖家账号授权链接获取授权码

链接:

https://auth.ebay.com/oauth2/authorize?client_id=********************
&redirect_uri=*************
&response_type=code
&scope=https%3A%2F%2Fapi.ebay.com%2Foauth%2Fapi_scope%20https%3A%2F%2Fapi.ebay.com%2Foauth%2Fapi_scope%2Fsell.marketing.readonly%20https%3A%2F%2Fapi.ebay.com%2Foauth%2Fapi_scope%2Fsell.marketing%20https%3A%2F%2Fapi.ebay.com%2Foauth%2Fapi_scope%2Fsell.inventory.readonly%20https%3A%2F%2Fapi.ebay.com%2Foauth%2Fapi_scope%2Fsell.inventory%20https%3A%2F%2Fapi.ebay.com%2Foauth%2Fapi_scope%2Fsell.account.readonly%20https%3A%2F%2Fapi.ebay.com%2Foauth%2Fapi_scope%2Fsell.account%20https%3A%2F%2Fapi.ebay.com%2Foauth%2Fapi_scope%2Fsell.fulfillment.readonly%20https%3A%2F%2Fapi.ebay.com%2Foauth%2Fapi_scope%2Fsell.fulfillment%20https%3A%2F%2Fapi.ebay.com%2Foauth%2Fapi_scope%2Fsell.analytics.readonly%20https%3A%2F%2Fapi.ebay.com%2Foauth%2Fapi_scope%2Fsell.finances%20https%3A%2F%2Fapi.ebay.com%2Foauth%2Fapi_scope%2Fsell.payment.dispute%20https%3A%2F%2Fapi.ebay.com%2Foauth%2Fapi_scope%2Fcommerce.identity.readonly
&prompt=login

client_id:ebay开发者账号的:APPid
redirect_uri:ebay开发者账号的:RunName

  • 访问上述链接。 将会跳转到ebay登录页面。 按提示登录。登录成功后将会进入授权页面。点击确认授权。
  • 请求ebay接口获取refresh_token

接口地址:https://api.ebay.com/identity/v1/oauth2/token
请求方式:POST
content-Type application/x-www-form-urlencoded
Authorization Basic 你的开发者秘钥

(开发者秘钥为ebay开发者账号转码后的结果):

转码参考工具:https://www.base64encode.org/

参数:grant_type=authorization_code&code=上述获取的code值&redirect_uri=你的ebay开发者账号的:RunName

请求返回结果:

获取ebay refresh_token 成功,记录保存好。 over

好好学习,天天向上。
最后更新于 2023-05-04