Tokens are encrypted, so you can't read anything from them. Store each token and send it back exactly as you received it in the Authorization header. Don't try to decode or change it.
Call the API from your server, not from a browser or mobile app. Getting a token takes your API secret, and anyone who has that secret can use your account through the API.
Keep your API secret and tokens in your server's secret store or environment variables, never in source code
Never send them to a browser or mobile app
Never write them to logs or error messages
Refresh the access token before it expires, and always save the new refresh token