matecsaj / ebay_rest

A pip package that conveniently wraps eBay’s RESTful APIs.
MIT License
43 stars 12 forks source link

Get generated refresh token #37

Closed viandanteoscuro closed 2 years ago

viandanteoscuro commented 2 years ago

Hi,

How i can get the generated refresh token and its expire date? Thanks

Great tool!!

Massimo

matecsaj commented 2 years ago

There are user and application variants, and they generate when first needed and regenerate before expiry; initially, they will have None values. You could drill into the API object for them. A code snippet demonstrates the technique.

api = API()
application_refresh_token = api._application_token._application_token.refresh_token
# likewise for the rest

They are encapsulated and protected (Python's term for hidden) within API because I never foresaw anyone needing them. Please enlighten me, and explain why you want them and how you will use them.

viandanteoscuro commented 2 years ago

It's only for internal purpose.

matecsaj commented 2 years ago

Thanks for advising; best wishes.