Hi @AbdulQayyum
I feel your pain – it took me ages to work it out.
I store the tokens in a database then use this API call to refresh the tokens (then store them). I went an extra step and check the timestamp of the saved tokens because the tokens expire.
Have you used an SDK in the language of your choice? There’s a few SDKs (php node, python, etc.) here.
And, I found the Sample Apps really helpful. You’ll find the HubSpot-php sample OAuth 2.0 app particularly interesting.
Once you get your head around the OAuth the fun begins - I promise.
Mike