question

frn8109 avatar image
0 Likes"
frn8109 asked

Token oAuth Renew in Production

I’m Francesco and I’m new in this forum. I’m trying to solve an issue and I didn’t find a solution on google. My scenario is the following: I’m trying to get the list of items using the Browse API The authentication header flag is obtained on the web site https://developer.ebay.com/my/auth/?env=production&index=0 and I’m using the production environment. The problem of this token is that after 2 hours I have to renew the token and this action, ‘till now, is manual. How Can I manage the renew of the oauth token to avoid the 2 hours expiration time? Thank you very much Francesco
token renew
10 |600

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

sanjiv_developersupport avatar image
1 Like"
sanjiv_developersupport answered
Hi @frn8109, Please go through the below document for refreshing OAuth token hope it helps you. Link: https://developer.ebay.com/api-docs/static/oauth-refresh-token-request.html
10 |600

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

frn8109 avatar image
0 Likes"
frn8109 answered
Hi @sanjiv_developersupport thanks for the reply. I have insert in Postman the data from https://developer.ebay.com/api-docs/static/oauth-refresh-token-request.html but something go wrong. The answer from the eBay server was: { "error": "unsupported_grant_type", "error_description": "grant type in request is not supported by the authorization server" } I attach here the parameter I have used in the call: POST https://api.ebay.com/identity/v1/oauth2/token HEADER Content-Type = application/x-www-form-urlencoded Authorization = Basic RnJhbmNlc2.... (the base64 encoding value from AppID:CertID) BODY grant_type = refresh_token refresh_token = v^1.1#i^1#p^3..... (oAuth Token for production environment) scope = https%3A%2F% 2Fapi.ebay.com%2Foauth%2Fapi_scope ( url-encoded https://api.ebay.com/oauth/api_scope) In brackets I included the more detailed explanation about the content I have included in the API call. Are you looking for some error in my API? Thanks in advance Francesco
10 |600

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

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.