question

jinkysab avatar image
0 Likes"
jinkysab asked

Client Credential Flow - no need to renew refresh token?

In my React app I just want to make simple GET requests to the Browse API to show to users on my site. For the Oauth authorisation I am following the Client Credentials flow https://developer.ebay.com/api-docs/static/oauth-client-credentials-grant.html..

For testing purposes I am using cURL and I'm not seeing any mention of a refresh token in the response. Is that because the refresh token doesn't expire applications, and you only need to get a new refresh token (after 18 months) for authorisation code grant flow https://developer.ebay.com/api-docs/static/oauth-authorization-code-grant.html

If I'm mistaken, please let me know!

oauth2refresh token rest api
· 4
10 |600 characters needed characters left characters exceeded

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

maybe you created a "Application Access Token", here you don´t get a refresh token. the refresh-token will be returned only if you create a "User Access Token", both a different flows.

Application Access Token: grant_type = client_credentials

User Access Token: grant_type = authorization_code

1 Like 1 ·
Awesome yes. I hadn't realised that application access token / client credentials route would not need to handle refresh tokens. That makes things much simpler :)
0 Likes 0 ·

Hmm OK, I'm getting a CORS error when making the request to https://api.ebay.com/identity/v1/oauth2/token.. The preflight check returns saying

  • Referrer Policy: strict-origin-when-cross-origin
(I'm in latest Chrome).

Is there any way around this to make the HTTP request?



0 Likes 0 ·

i only work in the backend, but when you search at google with "ebay oauth cors" you will find this: https://github.com/hendt/ebay-api/blob/master/README.md and in that project its said: "Because of the eBay CORS problems a Proxy server is required to use the API in the Browser. "

1 Like 1 ·

0 Answers

· Write an Answer

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.