private function getTokenFromResponse(array $data): string
    {
        $url = $data['nextSyncUrl'] ?? $data['nextPageUrl'];

        $queryValues = [];
        \parse_str(\parse_url($url, \PHP_URL_QUERY), $queryValues);

        return $queryValues['sync_token'];
    }