Create access token using refresh token
Closed this issue · 4 comments
josephkhanssd commented
Need clarification on these two issues
- What is client_id here? is it hive username? I am getting a code if I use hivesigner or a hive username or hive.blog (https://hivesigner.com/oauth2/authorize?client_id=CLIENT_ID&redirect_uri=REDIRECT_URI&response_type=code&scope=offline,comment,vote,comment_option,custom_json)
- I got the access_token, refresh_token, expires_in and username. But how do I use that refresh_token to create a new access_token? There is no mention of this in the docs.
feruzm commented
Hi,
- Yes
- Check here, there is way to generate access token with refresh token mentioned here: https://docs.hivesigner.com/h/guides/get-started/hivesigner-oauth2
josephkhanssd commented
token_expiration is 604800. I have checked the code it is hardcoded. is it in seconds?
feruzm commented
@josephkhanssd yes, 7 days. Your application should handle expiry logic.
josephkhanssd commented
@feruzm Got it. Thanks