protected static function refreshToken(&$api, $config, $retries = 0)
    {
        if ($retries >= 3) {
            return false; // Give up after 3 tries.
        }

        $response = (new Guzzle)->post(Client::AUTH_TOKEN, [
            'form_params' => [
                'type' => 'refresh',
                'refresh_token' => $api['refresh_token'],
                'client_id' => $config['services.37signals.client_id'],
                'client_secret' => $config['services.37signals.client_secret'],
                'redirect_uri' => $config['services.37signals.redirect'],
            ],
        ]);

        if (! $response or $response->getStatusCode() >= 400) {
            throw new \Exception('Error trying to connect.');
        }

        $token = json_decode($response->getBody());

        $api['token'] = $token->access_token;

        event('basecamp.refreshed_token', [$api['id'], $token]);

        // Now that we have a new access token, retry the original request.
        return true;
    }