question

jinkysab avatar image
0 Likes"
jinkysab asked

Moving to Browse API - How to call and refresh token in React

Hi,

I have a react app which calls the finding API via Axios. Essentially I build and store a request URL in a variable `url` and then pass this to Axios

return axios
      .get(url)
      .then((result) => {
// do stuff
}

I have my app set up and have `DevId`, `CertID` etc but I was wondering if anyone has, or has seen, an example of how to use the Browse API and handle auth token refresh etc.

oauth2browse apireact
· 2
10 |600

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

michab2003 avatar image michab2003 commented ·

in my opinion, no token should be called by the browser at all. the server-part of your app should handle the refreshing. if there is no server-part, okay, then it has nothing to do with the language you are using, everything is simple HTTP: https://developer.ebay.com/api-docs/static/oauth-refresh-token-request.html

0 Likes 0 ·
jinkysab avatar image jinkysab michab2003 commented ·
thanks @michab2003 - yes I'm serverless so will implement the HTTP option
0 Likes 0 ·

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.