[SOLVED] (Python Requests) 404 Error when trying to refresh a Token
EDIT: Since I cannot reply this topic, I'm editing to add my solution, right after the problem description.
Hi, all!
I'm trying to refresh a Token via Python, where I use Requests library to make a `POST` to `https://api.hubapi.com/oauth/v1/token`. However, this URL returns a `404` error. Bellow I've put my `headers` and call `body`:
My request is adapted from the Node.JS example. My authentication (getting the Tokens) was made using the Python library HS provide, but there seems to be no token refreshment method. I'm running on circles between these documentations, 404 errors or 415 errors (when posting from PostMan or Firefox).
Thank you in advance, Ricardo
------------------------------------------ -
SOLUTION:
It is a streight forward solution: you can use ``create_token`` method from HubSpot's library, changing the ``grant_type`` and adding your ``refresh_token`` to the parameters list in place of the ``code`` parameter. For instance: