question

jamack-47 avatar image
0 Likes"
jamack-47 asked

Token To Last Longer Than a Day,Token Expiration

Ok what am I missing here how do I get my token to last longer than a day? Anyone out there know how to do this and this is a production token I am using. Incorporating their new system into my scripts was a nightmare in itself now it's a expiring token issue.

,

This may sound like a dumb question but how do I a token that last longer than a day or two? I got it all working but my token keeps expiring on me so I have to get a new one.

tokenstoken expired
· 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.

what kind of token are you referring to?

0 Likes 0 ·
jamack-47 avatar image jamack-47 michab2003 ·
oAuth Production token.
0 Likes 0 ·
application or user token ?
0 Likes 0 ·
Show more comments

1 Answer

· Write an Answer
michab2003 avatar image
0 Likes"
michab2003 answered

that´s the security concept of a token: as less, it lives, as more secure it is. if someone is able to catch your token, that person is able to use that for only 2 hours. that might not prevent you from any damage to your (or the user's account) - but if that token would live much longer, u can guess what could happen in that time.

TLDR; as mentioned here: https://developer.ebay.com/api-docs/static/oauth-refresh-token-request.html - there is no parameter you can use to decide, how long a token lives, ebay is in control of generating the tokens and has a fixed lifetime for them. it´s up to you to use the refresh token to get a new token every 2 hours.

if you don't have to deal with end-customers-accounts, you still can get an auth'n'auth token, which has a lifetime of several months - but that kind of token is not usable for all apis. especially the new APIs require an oauth token.

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.