For get offline permission you need to use the code authorization flow and add scope "offline" along with the other permission you need. You would send your user to a page like this:
https://hivesigner.com/oauth2/authorize?client_id=CLIENT_ID&redirect_uri=REDIRECT_URI&response_type=code&scope=offline,comment,vote,comment_option,custom_json You will then receive a code which can be used to get a
refresh_token. Refresh token does not expire and you can create
access_token anytime with it. With the code you will need to send request to Hivesigner API at
https://hivesigner.com/api/oauth2/token?code=THE_CODE_YOU_GOT&client_secret=YOUR_APP_SECRET This request must be made from your server, don't make your app secret public. Also its recommended to send code and secret inside body of a POST request, instead of GET request with url param.