public function refreshAccessToken($refreshToken, $expiresIn = null)
    {
        $parameters = [
            'grant_type' => 'refresh_token',
            'refresh_token' => $refreshToken,
        ];

        if ($expiresIn != null) {
            $parameters['expires_in'] = $expiresIn;
        }

        return $this->tokenRequest('oauth2/token', $parameters);
    }
public function refreshAccessToken($refreshToken, $expiresIn = null)
    {
        $parameters = [
            'grant_type' => 'refresh_token',
            'refresh_token' => $refreshToken,
        ];

        if ($expiresIn != null) {
            $parameters['expires_in'] = $expiresIn;
        }

        return $this->tokenRequest('oauth2/token', $parameters);
    }
public function refreshAccessToken ( $ refreshToken , $ expiresIn = null ) { $ parameters = [ 'grant_type' => 'refresh_token' , 'refresh_token' => $ refreshToken , ] ; if ( $ expiresIn != null ) { $ parameters [ 'expires_in' ] = $ expiresIn ; } return $ this -> tokenRequest ( 'oauth2/token' , $ parameters ) ; }
Refresh Fitbit token.

@param string $refreshToken refresh token
@param int|null $expiresIn set length of token
@return ResponseInterface response from Fitbit API
Refresh Fitbit token .