question

it_support_and_services avatar image
0 Likes"
it_support_and_services asked

Refresh Token

Is it possible to get a refresh token when creating a user token with the "Get a User Token Here" option? From what I can see, it only creates a User Token
tokenstoken renew
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.

ankit_developersupport avatar image
0 Likes"
ankit_developersupport answered
Hi @it_support_and_services, Yes, it's possible. You can follow the below steps to get a refresh token. To renew your user tokens without signing into your developer account, implement support to Get Tokens from your application. To update your token manually from within your developer account: 1. Go to the User Tokens page for your Production AppID, and follow the instructions to “Get a User Token Here”. 2. Choose Production as the environment and Auth 'n' Auth as the token type. 3. Click the blue-button to sign into eBay’s Production site. You will be redirected to sign in to eBay. 4. On the eBay sign-in page, enter the eBay username and password for the eBay member. 5. On the next screen, consent to allow the application to access that member’s data. 6. After you are redirected back to the User Tokens page on developer.ebay.com, you will see the token for that user. The token will not be stored in your developer account. You can copy the token and save it locally. The token will expire after 18 months. Best Regards eBay Developer Support.
· 1
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.

Get a User Token worked before but recently it says "The secret Id is invalid", I cannot get the token that will expire after 18 months. I only can get token that will expire after 2 hours at https://developer.ebay.com/my/api_test_tool?index=0&env=production

Please advise!

0 Likes 0 ·
it_support_and_services avatar image
0 Likes"
it_support_and_services answered
Thanks. I've gone through that procedure and got a token but isn't that an Auth'n'auth User token? I want an oAuth refresh token. This system is extremely complicated. I've been programming for 40 years and I don't think I've ever met a system as difficult to use or as badly documented as this. :(
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.

it_support_and_services avatar image
0 Likes"
it_support_and_services answered
@ankit_developersupport · I've just tried using it but it doesn't work. I get the error - "the provided authorization refresh token is invalid or was issued to another client"
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.

krich_developersupport avatar image
0 Likes"
krich_developersupport answered
@it_support_and_services Sorry but you cannot get a **refresh token** for a User access token through the eBay Developers Program site, you must follow the procedure here to get a refresh token: https://developer.ebay.com/api-docs/static/oauth-authorization-code-grant.html And I agree, the process is a bit complicated--You must first configure your RuName, then issue the consent request. This request should display a Consent page (hosted by eBay), and after consenting, grab the authorization code returned by the response. Lastly, you must use the code in a request to get the User access token, which returns the User access token and the refresh token. Hope this helps,
· 1
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.

Its not that this process is complicated (well, actually, it is), the real problem is that Ebay requires me to write code for a process ("get a refresh token") that I will only need to do once every 18 months! Why in the world does Ebay not provide this capability in the Developers pages? The "Auth'n'Auth" process does this just fine, but OAuth is a nightmare (and it does not have to be).
0 Likes 0 ·
hookedontronics avatar image
0 Likes"
hookedontronics answered
@krich_developersupport I am following all the step but i am still getting this error while generating the user Access Token. Can someone please help?
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.

sanjiv_developersupport avatar image
0 Likes"
sanjiv_developersupport answered
Hi @hookedontronics , Can you please share with us your request body with the headers( masking your private data ) and parameter you are passing to make the call. Best Regards, eBay Developer Program
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.

zoka_2 avatar image
0 Likes"
zoka_2 answered

what to hell is ruName?

· 1
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.

Did you ever get this figured out what a complicated mess they should provide a simple easy way to do this instead of a nightmare from you know where.
0 Likes 0 ·
michab2003 avatar image
0 Likes"
michab2003 answered

i am surprised, that this oauth stuff is still a problem for many people. my suggestion is to install postman and follow the ebay docu which shows example calls. a none developer shouldn´t have any problems making requests with postman, it´s actually nothing more than copy&paste. put in the correct URL, some headers, a body.... that´s it.

https://developer.ebay.com/api-docs/static/oauth-authorization-code-grant.html#sequence

if you don´t know what a "runame" is, google is a very powerful instrument:

https://developer.ebay.com/api-docs/static/oauth-redirect-uri.html

I hope, this helps a bit.

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.

cabin-globa avatar image
0 Likes"
cabin-globa answered

What is surprising is that Ebay does not supply a simple UI that does all those steps and gives a developer what they need (a long-lasting token to use in their API calls). This is still a problem for many people because like me, they have to ONCE A YEAR come back and find the docs, re-read them all, find the tools (postman, etc) and run all those same manual steps again. It is crazy that Ebay does not automate this one time for everyone to use.

I use APIs from PayPal, Reverb, Easypost, Google, and Amazon and NONE of them require these kind of manual steps to get a security token, they all provide them through developer web pages.

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.

michab2003 avatar image
1 Like"
michab2003 answered

first: there is a nice UI - the ebay API test tool where you can get a token for testing with one click.

but that is for testing of course! not for production.

secondly: what the heck should ebay automate here? you cannot automate the login of a user

that´s so stupid ;)

third: a nice fancy UI is no help here. do you want to login on to a website every 2 hours to get a new token and copy&paste it into your application? - sure not ;) the fact that other companies offer "long-living tokens" does not mean - that this is good and ebay does it wrong - the opposite is the case!

having tokens or keys that live forever is the worst u can have - maybe it´s comfortable for non-developers, but non-developers shouldn´t work with that - there are developers out there to handle this. and the ebay APIs are NOT made for someone who is able to write "ping google.de" on the command line, the APIs are made for "developers". i am not a mechanic - why should I complain that car motors are so complex? if there is a problem, I must be stupid starting to dismantle the motor of my car by myself - instead, i go to an "auto repair shop" when something is not working. because there are people who deal with motors every day. and if I am not smart enough to do that on my own - it´s not wise to complain about "the thing" - I should complain about myself. either I invest time to learn how things work to help myself in the future - or - if I only need help once a year - I leave that to the professionals and invest my time in more important things I am able to handle myself.

but when it comes to APIs, non-developers always complain about everything, pardon - this is stupid. learn it - get somebody or leave it.

ebay has more than enough documentation out there, there are tons of SDKs and code snippets everywhere. but it´s useless to argue with a baker about rocket science.

it might sound hard, but that´s how it is, sorry.

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.

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.