I’m fixing some things in a project where we’re using a PHP+Laravel backend and a Hubspot client to query the API. So for example to get deals we do this:
$response = \HubSpot\Factory::createWithAccessToken($token)->crm()->deals()->basicApi()->getPage();
But when trying to use the client to refresh the token there’s a problem, the method createToken doesn’t seem to exist.
$refreshedToken = \HubSpot\Factory::create()->auth()->oAuth()->tokensApi()->createToken( 'refresh_token', null, $redirect_uri, $client_id, $client_secret, $refresh_token );
I couldn’t find documentation for this client, what’s the appropiate way to refresh tokens using it?