googleapis / google-api-php-client

A PHP client library for accessing Google APIs
http://googleapis.github.io/google-api-php-client/
Apache License 2.0
9.32k stars 3.52k forks source link

Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential #2479

Closed khawala closed 8 months ago

khawala commented 1 year ago

Hello all I'm trying to reach google analytics scope in order to get the total visitors to my sit but i get this error when I use the json file of Outh 2.0 in the setConfig method

{
    "error": {
        "code": 401,
        "message": "Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.",
        "errors": [
            {
                "message": "Login Required.",
                "domain": "global",
                "reason": "required",
                "location": "Authorization",
                "locationType": "header"
            }
        ],
        "status": "UNAUTHENTICATED",
        "details": [
            {
                "@type": "type.googleapis.com/google.rpc.ErrorInfo",
                "reason": "CREDENTIALS_MISSING",
                "domain": "googleapis.com",
                "metadata": {
                    "service": "analyticsreporting.googleapis.com",
                    "method": "google.analytics.reporting.v4.Reporting.GetReports"
                }
            }
        ]
    }
}

Why this happened i need to know

yash30201 commented 1 year ago

Hi @khawala, Can you please provide a repro case for this issue?

yash30201 commented 1 year ago

Closing this issue due to inactivity. Please feel free to reopen if the issue still persists.

JrCaters commented 1 year ago

Hey guys, I've got the same issue. I spent the last 3 days trying to found a solution. I really need help. I'm using the version 2.14.0

I've got an error when I tried to upload a youtube reference file with the Youtube Partner API. I've implemented the code found here https://developers.google.com/youtube/partner/code_samples/php#upload_a_reference last year and it was working. But the last few weeks I started to have error from that code even if I didn't change anything.

I regenerated my refresh_token but still not working and I know that my access_token it's working because the error occurs when I try to upload the file. If my access_token was invalid I would not have able to do the previous steps. I think...

code ``` // Create a MediaFileUpload object for resumable uploads. $media = new Google_Http_MediaFileUpload( $client, $insertRequest, 'video/*', null, true, $chunkSizeBytes ); $media->setFileSize(filesize($referenceVideoPath)); // Read the media file and upload it chunk by chunk. $status = false; $handle = fopen($referenceVideoPath, "rb"); while (!$status && !feof($handle)) { $chunk = fread($handle, $chunkSizeBytes); $status = $media->nextChunk($chunk); } ```

To be more precise the error happened with the nextChunk function. The beginning of the error:

error ``` Google\Service\Exception Object ( [errors:protected] => Array ( [0] => Array ( [message] => Login Required. [domain] => global [reason] => required [location] => Authorization [locationType] => header ) ) [message:protected] => { "error": { "code": 401, "message": "Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.", "errors": [ { "message": "Login Required.", "domain": "global", "reason": "required", "location": "Authorization", "locationType": "header" } ], "status": "UNAUTHENTICATED", "details": [ { "@type": "type.googleapis.com/google.rpc.ErrorInfo", "reason": "CREDENTIALS_MISSING", "domain": "googleapis.com", "metadata": { "method": "youtube.partner.api.proto.frontend.v1.YoutubePartnerReferences.Insert", "service": "youtubepartner.googleapis.com" } } ] } } ```

After deep debugging I understood that the ScopedAccessTokenMiddleware is there to set Authorization header, if in the Client config there is that value [auth] = 'scoped' So I debugged in the __inkove function to see if it did its job and it does.

code ``` GuzzleHttp\Psr7\Request Object ( [method:GuzzleHttp\Psr7\Request:private] => POST [requestTarget:GuzzleHttp\Psr7\Request:private] => [uri:GuzzleHttp\Psr7\Request:private] => GuzzleHttp\Psr7\Uri Object ( [scheme:GuzzleHttp\Psr7\Uri:private] => https [userInfo:GuzzleHttp\Psr7\Uri:private] => [host:GuzzleHttp\Psr7\Uri:private] => www.googleapis.com [port:GuzzleHttp\Psr7\Uri:private] => [path:GuzzleHttp\Psr7\Uri:private] => /upload/youtube/partner/v1/references [query:GuzzleHttp\Psr7\Uri:private] => onBehalfOfContentOwner=_hidden_&uploadType=resumable [fragment:GuzzleHttp\Psr7\Uri:private] => [composedComponents:GuzzleHttp\Psr7\Uri:private] => https://www.googleapis.com/upload/youtube/partner/v1/references?onBehalfOfContentOwner=_hidden_&uploadType=resumable ) [headers:GuzzleHttp\Psr7\Request:private] => Array ( [Host] => Array ( [0] => www.googleapis.com ) [X-Php-Expected-Class] => Array ( [0] => Google_Service_YouTubePartner_Reference ) [content-type] => Array ( [0] => application/json; charset=UTF-8 ) [content-length] => Array ( [0] => 52 ) [x-upload-content-type] => Array ( [0] => video/mp4 ) [x-upload-content-length] => Array ( [0] => 42647938 ) [expect] => Array ( [0] => ) [User-Agent] => Array ( [0] => google-api-php-client/2.12.6 ) [x-goog-api-client] => Array ( [0] => gl-php/7.4.33 gdcl/2.12.6 ) [authorization] => Array ( [0] => Bearer ya29.a0AfB_byAMxKHGOvCK6cN-wSXyqYEgJpnTJ_HkEQ5i08u2lNEuW-C46XQAxJyi19IiPf1j0ybPniTF_eigrXrEN4Fx_UVpGc5Hh8q3V3Px_-ZYoFJIEK1uGmk9F0GKcBTpqnIlmsBBHL-WrtttYjnd2XYmNG-xr854qGfKZgaCgYKAV0SARESFQGOcNnClNP459ZIdGzYGbPAkrLRvA0173 ) ) [headerNames:GuzzleHttp\Psr7\Request:private] => Array ( [host] => Host [x-php-expected-class] => X-Php-Expected-Class [content-type] => content-type [content-length] => content-length [x-upload-content-type] => x-upload-content-type [x-upload-content-length] => x-upload-content-length [expect] => expect [user-agent] => User-Agent [x-goog-api-client] => x-goog-api-client [authorization] => authorization ) [protocol:GuzzleHttp\Psr7\Request:private] => 1.1 [stream:GuzzleHttp\Psr7\Request:private] => GuzzleHttp\Psr7\Stream Object ( [stream:GuzzleHttp\Psr7\Stream:private] => Resource id #122 [size:GuzzleHttp\Psr7\Stream:private] => 52 [seekable:GuzzleHttp\Psr7\Stream:private] => 1 [readable:GuzzleHttp\Psr7\Stream:private] => 1 [writable:GuzzleHttp\Psr7\Stream:private] => 1 [uri:GuzzleHttp\Psr7\Stream:private] => php://temp [customMetadata:GuzzleHttp\Psr7\Stream:private] => Array ( ) ) ) ```

As you can see the Authorization header is present.

Any help will be hugely appreciated

JrCaters commented 1 year ago

The full error

error ``` Google\Service\Exception Object ( [errors:protected] => Array ( [0] => Array ( [message] => Login Required. [domain] => global [reason] => required [location] => Authorization [locationType] => header ) ) [message:protected] => { "error": { "code": 401, "message": "Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.", "errors": [ { "message": "Login Required.", "domain": "global", "reason": "required", "location": "Authorization", "locationType": "header" } ], "status": "UNAUTHENTICATED", "details": [ { "@type": "type.googleapis.com/google.rpc.ErrorInfo", "reason": "CREDENTIALS_MISSING", "domain": "googleapis.com", "metadata": { "method": "youtube.partner.api.proto.frontend.v1.YoutubePartnerReferences.Insert", "service": "youtubepartner.googleapis.com" } } ] } } [string:Exception:private] => [code:protected] => 401 [file:protected] => /Users/*********/projects/google-api/Google/vendor/google/apiclient/src/Http/REST.php [line:protected] => 158 [trace:Exception:private] => Array ( [0] => Array ( [file] => /Users/*********/projects/google-api/Google/vendor/google/apiclient/src/Http/REST.php [line] => 131 [function] => decodeHttpResponse [class] => Google\Http\REST [type] => :: [args] => Array ( [0] => GuzzleHttp\Psr7\Response Object ( [reasonPhrase:GuzzleHttp\Psr7\Response:private] => Unauthorized [statusCode:GuzzleHttp\Psr7\Response:private] => 401 [headers:GuzzleHttp\Psr7\Response:private] => Array ( [X-GUploader-UploadID] => Array ( [0] => ADPycdvTaw48eRDUBwMj7RzyEeQDtG7UB324Vkn5AzutcwOU6tB8HkQkn2UOlnOpnzLYKGYC395BuKs-OFuOzvdLAk0zPED2mk6D ) [WWW-Authenticate] => Array ( [0] => Bearer realm="https://accounts.google.com/" ) [Vary] => Array ( [0] => Origin [1] => X-Origin [2] => Referer ) [Content-Type] => Array ( [0] => application/json; charset=UTF-8 ) [Content-Length] => Array ( [0] => 865 ) [Date] => Array ( [0] => Fri, 15 Sep 2023 11:29:56 GMT ) [Server] => Array ( [0] => UploadServer ) [Alt-Svc] => Array ( [0] => h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 ) ) [headerNames:GuzzleHttp\Psr7\Response:private] => Array ( [x-guploader-uploadid] => X-GUploader-UploadID [www-authenticate] => WWW-Authenticate [vary] => Vary [content-type] => Content-Type [content-length] => Content-Length [date] => Date [server] => Server [alt-svc] => Alt-Svc ) [protocol:GuzzleHttp\Psr7\Response:private] => 1.1 [stream:GuzzleHttp\Psr7\Response:private] => GuzzleHttp\Psr7\Stream Object ( [stream:GuzzleHttp\Psr7\Stream:private] => Resource id #125 [size:GuzzleHttp\Psr7\Stream:private] => [seekable:GuzzleHttp\Psr7\Stream:private] => 1 [readable:GuzzleHttp\Psr7\Stream:private] => 1 [writable:GuzzleHttp\Psr7\Stream:private] => 1 [uri:GuzzleHttp\Psr7\Stream:private] => php://temp [customMetadata:GuzzleHttp\Psr7\Stream:private] => Array ( ) ) ) [1] => GuzzleHttp\Psr7\Request Object ( [method:GuzzleHttp\Psr7\Request:private] => POST [requestTarget:GuzzleHttp\Psr7\Request:private] => [uri:GuzzleHttp\Psr7\Request:private] => GuzzleHttp\Psr7\Uri Object ( [scheme:GuzzleHttp\Psr7\Uri:private] => https [userInfo:GuzzleHttp\Psr7\Uri:private] => [host:GuzzleHttp\Psr7\Uri:private] => www.googleapis.com [port:GuzzleHttp\Psr7\Uri:private] => [path:GuzzleHttp\Psr7\Uri:private] => /upload/youtube/partner/v1/references [query:GuzzleHttp\Psr7\Uri:private] => onBehalfOfContentOwner=_hidden_content_owner_&uploadType=resumable [fragment:GuzzleHttp\Psr7\Uri:private] => [composedComponents:GuzzleHttp\Psr7\Uri:private] => https://www.googleapis.com/upload/youtube/partner/v1/references?onBehalfOfContentOwner=_hidden_content_owner_&uploadType=resumable ) [headers:GuzzleHttp\Psr7\Request:private] => Array ( [Host] => Array ( [0] => www.googleapis.com ) [X-Php-Expected-Class] => Array ( [0] => Google_Service_YouTubePartner_Reference ) [content-type] => Array ( [0] => application/json; charset=UTF-8 ) [content-length] => Array ( [0] => 52 ) [x-upload-content-type] => Array ( [0] => video/mp4 ) [x-upload-content-length] => Array ( [0] => 42647938 ) [expect] => Array ( [0] => ) [User-Agent] => Array ( [0] => google-api-php-client/2.12.6 ) [x-goog-api-client] => Array ( [0] => gl-php/7.4.33 gdcl/2.12.6 ) ) [headerNames:GuzzleHttp\Psr7\Request:private] => Array ( [content-type] => content-type [host] => Host [x-php-expected-class] => X-Php-Expected-Class [content-length] => content-length [x-upload-content-type] => x-upload-content-type [x-upload-content-length] => x-upload-content-length [expect] => expect [user-agent] => User-Agent [x-goog-api-client] => x-goog-api-client ) [protocol:GuzzleHttp\Psr7\Request:private] => 1.1 [stream:GuzzleHttp\Psr7\Request:private] => GuzzleHttp\Psr7\Stream Object ( [stream:GuzzleHttp\Psr7\Stream:private] => Resource id #122 [size:GuzzleHttp\Psr7\Stream:private] => 52 [seekable:GuzzleHttp\Psr7\Stream:private] => 1 [readable:GuzzleHttp\Psr7\Stream:private] => 1 [writable:GuzzleHttp\Psr7\Stream:private] => 1 [uri:GuzzleHttp\Psr7\Stream:private] => php://temp [customMetadata:GuzzleHttp\Psr7\Stream:private] => Array ( ) ) ) [2] => ) ) [1] => Array ( [function] => doExecute [class] => Google\Http\REST [type] => :: [args] => Array ( [0] => GuzzleHttp\Client Object ( [config:GuzzleHttp\Client:private] => Array ( [base_uri] => GuzzleHttp\Psr7\Uri Object ( [scheme:GuzzleHttp\Psr7\Uri:private] => https [userInfo:GuzzleHttp\Psr7\Uri:private] => [host:GuzzleHttp\Psr7\Uri:private] => www.googleapis.com [port:GuzzleHttp\Psr7\Uri:private] => [path:GuzzleHttp\Psr7\Uri:private] => [query:GuzzleHttp\Psr7\Uri:private] => [fragment:GuzzleHttp\Psr7\Uri:private] => [composedComponents:GuzzleHttp\Psr7\Uri:private] => ) [http_errors] => [handler] => GuzzleHttp\HandlerStack Object ( [handler:GuzzleHttp\HandlerStack:private] => Closure Object ( [static] => Array ( [default] => Closure Object ( [static] => Array ( [default] => GuzzleHttp\Handler\CurlMultiHandler Object ( [factory:GuzzleHttp\Handler\CurlMultiHandler:private] => GuzzleHttp\Handler\CurlFactory Object ( [handles:GuzzleHttp\Handler\CurlFactory:private] => Array ( ) [maxHandles:GuzzleHttp\Handler\CurlFactory:private] => 50 ) [selectTimeout:GuzzleHttp\Handler\CurlMultiHandler:private] => 1 [active:GuzzleHttp\Handler\CurlMultiHandler:private] => 0 [handles:GuzzleHttp\Handler\CurlMultiHandler:private] => Array ( ) [delays:GuzzleHttp\Handler\CurlMultiHandler:private] => Array ( ) [options:GuzzleHttp\Handler\CurlMultiHandler:private] => Array ( ) ) [sync] => GuzzleHttp\Handler\CurlHandler Object ( [factory:GuzzleHttp\Handler\CurlHandler:private] => GuzzleHttp\Handler\CurlFactory Object ( [handles:GuzzleHttp\Handler\CurlFactory:private] => Array ( [0] => Resource id #94 ) [maxHandles:GuzzleHttp\Handler\CurlFactory:private] => 3 ) ) ) [parameter] => Array ( [$request] => [$options] => ) ) [streaming] => GuzzleHttp\Handler\StreamHandler Object ( [lastHeaders:GuzzleHttp\Handler\StreamHandler:private] => Array ( ) ) ) [parameter] => Array ( [$request] => [$options] => ) ) [stack:GuzzleHttp\HandlerStack:private] => Array ( [0] => Array ( [0] => Closure Object ( [static] => Array ( [bodySummarizer] => ) [parameter] => Array ( [$handler] => ) ) [1] => http_errors ) [1] => Array ( [0] => Closure Object ( [parameter] => Array ( [$handler] => ) ) [1] => allow_redirects ) [2] => Array ( [0] => Closure Object ( [parameter] => Array ( [$handler] => ) ) [1] => cookies ) [3] => Array ( [0] => Closure Object ( [parameter] => Array ( [$handler] => ) ) [1] => prepare_body ) [4] => Array ( [0] => Google\Auth\Middleware\ScopedAccessTokenMiddleware Object ( [tokenFunc:Google\Auth\Middleware\ScopedAccessTokenMiddleware:private] => Closure Object ( [static] => Array ( [token] => Array ( [access_token] => ya29.a0AfB_byAtXxR7thImWmOzNKwJH2O1dTB92wO3pZAd2jLrogZ_iKfwlaw3qg3SK5eV25kX3iu_Z2fHBmN-dqBixjDK1U1qsNYJfWwiX5fWH4hPAZTvx_f-sASdMMitfu69UVjwv0y4F3GwBBllFnE4bLcCwclXrR_PRXZ7aCgYKAdISARESFQGOcNnCgMlFRJHTGjCGrdjifr2C1w0171 [expires_in] => 3599 [scope] => https://www.googleapis.com/auth/yt-analytics.readonly https://www.googleapis.com/auth/youtube.channel-memberships.creator https://www.googleapis.com/auth/youtube.upload https://www.googleapis.com/auth/youtube.force-ssl https://www.googleapis.com/auth/youtube.readonly https://www.googleapis.com/auth/youtubepartner-channel-audit https://www.googleapis.com/auth/youtube https://www.googleapis.com/auth/drive.metadata.readonly https://www.googleapis.com/auth/yt-analytics-monetary.readonly https://www.googleapis.com/auth/youtubepartner [token_type] => Bearer [created] => 1694777394 [refresh_token] => ****hidden refresh_token**** ) ) [this] => Google\AuthHandler\Guzzle7AuthHandler Object ( [cache:protected] => Google\Auth\Cache\MemoryCacheItemPool Object ( [items:Google\Auth\Cache\MemoryCacheItemPool:private] => Array ( [833d46aa77f3d802342527ed5eac827fa906592350cc03635fdf1775eb85f1f8] => Google\Auth\Cache\Item Object ( [key:Google\Auth\Cache\Item:private] => 833d46aa77f3d802342527ed5eac827fa906592350cc03635fdf1775eb85f1f8 [value:Google\Auth\Cache\Item:private] => ya29.a0AfB_byAtXxR7thImWmOzNKwJH2O1dTB92wO3pZAd2jLrogZ_iKfwlaw3qg3SK5eV25kX3iu_Z2fHBmN-dqBixjDK1U1qsNYJfWwiX5fWH4hPAZTvx_f-sASdMMitfu69UVjwv0y4F3GwBBllFnE4bLcCwclXrR_PRXZ7aCgYKAdISARESFQGOcNnCgMlFRJHTGjCGrdjifr2C1w0171 [expiration:Google\Auth\Cache\Item:private] => DateTime Object ( [date] => 2023-09-15 11:54:54.783449 [timezone_type] => 3 [timezone] => UTC ) [isHit:Google\Auth\Cache\Item:private] => 1 ) ) [deferredItems:Google\Auth\Cache\MemoryCacheItemPool:private] => ) [cacheConfig:protected] => Array ( ) ) [parameter] => Array ( [$scopes] => ) ) [scopes:Google\Auth\Middleware\ScopedAccessTokenMiddleware:private] => Array ( [0] => https://www.googleapis.com/auth/youtube https://www.googleapis.com/auth/youtube.force-ssl https://www.googleapis.com/auth/youtubepartner ) [maxKeyLength:Google\Auth\Middleware\ScopedAccessTokenMiddleware:private] => 64 [cacheConfig:Google\Auth\Middleware\ScopedAccessTokenMiddleware:private] => Array ( [lifetime] => 1500 [prefix] => ) [cache:Google\Auth\Middleware\ScopedAccessTokenMiddleware:private] => Google\Auth\Cache\MemoryCacheItemPool Object ( [items:Google\Auth\Cache\MemoryCacheItemPool:private] => Array ( [833d46aa77f3d802342527ed5eac827fa906592350cc03635fdf1775eb85f1f8] => Google\Auth\Cache\Item Object ( [key:Google\Auth\Cache\Item:private] => 833d46aa77f3d802342527ed5eac827fa906592350cc03635fdf1775eb85f1f8 [value:Google\Auth\Cache\Item:private] => ya29.a0AfB_byAtXxR7thImWmOzNKwJH2O1dTB92wO3pZAd2jLrogZ_iKfwlaw3qg3SK5eV25kX3iu_Z2fHBmN-dqBixjDK1U1qsNYJfWwiX5fWH4hPAZTvx_f-sASdMMitfu69UVjwv0y4F3GwBBllFnE4bLcCwclXrR_PRXZ7aCgYKAdISARESFQGOcNnCgMlFRJHTGjCGrdjifr2C1w0171 [expiration:Google\Auth\Cache\Item:private] => DateTime Object ( [date] => 2023-09-15 11:54:54.783449 [timezone_type] => 3 [timezone] => UTC ) [isHit:Google\Auth\Cache\Item:private] => 1 ) ) [deferredItems:Google\Auth\Cache\MemoryCacheItemPool:private] => ) ) [1] => google_auth ) ) [cached:GuzzleHttp\HandlerStack:private] => Closure Object ( [static] => Array ( [handler] => GuzzleHttp\RedirectMiddleware Object ( [nextHandler:GuzzleHttp\RedirectMiddleware:private] => Closure Object ( [static] => Array ( [handler] => GuzzleHttp\PrepareBodyMiddleware Object ( [nextHandler:GuzzleHttp\PrepareBodyMiddleware:private] => Closure Object ( [static] => Array ( [handler] => Closure Object ( [static] => Array ( [default] => Closure Object ( [static] => Array ( [default] => GuzzleHttp\Handler\CurlMultiHandler Object ( [factory:GuzzleHttp\Handler\CurlMultiHandler:private] => GuzzleHttp\Handler\CurlFactory Object ( [handles:GuzzleHttp\Handler\CurlFactory:private] => Array ( ) [maxHandles:GuzzleHttp\Handler\CurlFactory:private] => 50 ) [selectTimeout:GuzzleHttp\Handler\CurlMultiHandler:private] => 1 [active:GuzzleHttp\Handler\CurlMultiHandler:private] => 0 [handles:GuzzleHttp\Handler\CurlMultiHandler:private] => Array ( ) [delays:GuzzleHttp\Handler\CurlMultiHandler:private] => Array ( ) [options:GuzzleHttp\Handler\CurlMultiHandler:private] => Array ( ) ) [sync] => GuzzleHttp\Handler\CurlHandler Object ( [factory:GuzzleHttp\Handler\CurlHandler:private] => GuzzleHttp\Handler\CurlFactory Object ( [handles:GuzzleHttp\Handler\CurlFactory:private] => Array ( [0] => Resource id #94 ) [maxHandles:GuzzleHttp\Handler\CurlFactory:private] => 3 ) ) ) [parameter] => Array ( [$request] => [$options] => ) ) [streaming] => GuzzleHttp\Handler\StreamHandler Object ( [lastHeaders:GuzzleHttp\Handler\StreamHandler:private] => Array ( ) ) ) [parameter] => Array ( [$request] => [$options] => ) ) ) [this] => Google\Auth\Middleware\ScopedAccessTokenMiddleware Object ( [tokenFunc:Google\Auth\Middleware\ScopedAccessTokenMiddleware:private] => Closure Object ( [static] => Array ( [token] => Array ( [access_token] => ya29.a0AfB_byAtXxR7thImWmOzNKwJH2O1dTB92wO3pZAd2jLrogZ_iKfwlaw3qg3SK5eV25kX3iu_Z2fHBmN-dqBixjDK1U1qsNYJfWwiX5fWH4hPAZTvx_f-sASdMMitfu69UVjwv0y4F3GwBBllFnE4bLcCwclXrR_PRXZ7aCgYKAdISARESFQGOcNnCgMlFRJHTGjCGrdjifr2C1w0171 [expires_in] => 3599 [scope] => https://www.googleapis.com/auth/yt-analytics.readonly https://www.googleapis.com/auth/youtube.channel-memberships.creator https://www.googleapis.com/auth/youtube.upload https://www.googleapis.com/auth/youtube.force-ssl https://www.googleapis.com/auth/youtube.readonly https://www.googleapis.com/auth/youtubepartner-channel-audit https://www.googleapis.com/auth/youtube https://www.googleapis.com/auth/drive.metadata.readonly https://www.googleapis.com/auth/yt-analytics-monetary.readonly https://www.googleapis.com/auth/youtubepartner [token_type] => Bearer [created] => 1694777394 [refresh_token] => ****hidden refresh_token**** ) ) [this] => Google\AuthHandler\Guzzle7AuthHandler Object ( [cache:protected] => Google\Auth\Cache\MemoryCacheItemPool Object ( [items:Google\Auth\Cache\MemoryCacheItemPool:private] => Array ( [833d46aa77f3d802342527ed5eac827fa906592350cc03635fdf1775eb85f1f8] => Google\Auth\Cache\Item Object ( [key:Google\Auth\Cache\Item:private] => 833d46aa77f3d802342527ed5eac827fa906592350cc03635fdf1775eb85f1f8 [value:Google\Auth\Cache\Item:private] => ya29.a0AfB_byAtXxR7thImWmOzNKwJH2O1dTB92wO3pZAd2jLrogZ_iKfwlaw3qg3SK5eV25kX3iu_Z2fHBmN-dqBixjDK1U1qsNYJfWwiX5fWH4hPAZTvx_f-sASdMMitfu69UVjwv0y4F3GwBBllFnE4bLcCwclXrR_PRXZ7aCgYKAdISARESFQGOcNnCgMlFRJHTGjCGrdjifr2C1w0171 [expiration:Google\Auth\Cache\Item:private] => DateTime Object ( [date] => 2023-09-15 11:54:54.783449 [timezone_type] => 3 [timezone] => UTC ) [isHit:Google\Auth\Cache\Item:private] => 1 ) ) [deferredItems:Google\Auth\Cache\MemoryCacheItemPool:private] => ) [cacheConfig:protected] => Array ( ) ) [parameter] => Array ( [$scopes] => ) ) [scopes:Google\Auth\Middleware\ScopedAccessTokenMiddleware:private] => Array ( [0] => https://www.googleapis.com/auth/youtube https://www.googleapis.com/auth/youtube.force-ssl https://www.googleapis.com/auth/youtubepartner ) [maxKeyLength:Google\Auth\Middleware\ScopedAccessTokenMiddleware:private] => 64 [cacheConfig:Google\Auth\Middleware\ScopedAccessTokenMiddleware:private] => Array ( [lifetime] => 1500 [prefix] => ) [cache:Google\Auth\Middleware\ScopedAccessTokenMiddleware:private] => Google\Auth\Cache\MemoryCacheItemPool Object ( [items:Google\Auth\Cache\MemoryCacheItemPool:private] => Array ( [833d46aa77f3d802342527ed5eac827fa906592350cc03635fdf1775eb85f1f8] => Google\Auth\Cache\Item Object ( [key:Google\Auth\Cache\Item:private] => 833d46aa77f3d802342527ed5eac827fa906592350cc03635fdf1775eb85f1f8 [value:Google\Auth\Cache\Item:private] => ya29.a0AfB_byAtXxR7thImWmOzNKwJH2O1dTB92wO3pZAd2jLrogZ_iKfwlaw3qg3SK5eV25kX3iu_Z2fHBmN-dqBixjDK1U1qsNYJfWwiX5fWH4hPAZTvx_f-sASdMMitfu69UVjwv0y4F3GwBBllFnE4bLcCwclXrR_PRXZ7aCgYKAdISARESFQGOcNnCgMlFRJHTGjCGrdjifr2C1w0171 [expiration:Google\Auth\Cache\Item:private] => DateTime Object ( [date] => 2023-09-15 11:54:54.783449 [timezone_type] => 3 [timezone] => UTC ) [isHit:Google\Auth\Cache\Item:private] => 1 ) ) [deferredItems:Google\Auth\Cache\MemoryCacheItemPool:private] => ) ) [parameter] => Array ( [$request] => [$options] => ) ) ) ) [parameter] => Array ( [$request] => [$options] => ) ) ) [bodySummarizer] => ) [parameter] => Array ( [$request] => [$options] => ) ) ) [allow_redirects] => Array ( [max] => 5 [protocols] => Array ( [0] => http [1] => https ) [strict] => [referer] => [track_redirects] => ) [decode_content] => 1 [verify] => 1 [cookies] => [idn_conversion] => [headers] => Array ( [User-Agent] => GuzzleHttp/7 ) [auth] => scoped ) ) [1] => GuzzleHttp\Psr7\Request Object ( [method:GuzzleHttp\Psr7\Request:private] => POST [requestTarget:GuzzleHttp\Psr7\Request:private] => [uri:GuzzleHttp\Psr7\Request:private] => GuzzleHttp\Psr7\Uri Object ( [scheme:GuzzleHttp\Psr7\Uri:private] => https [userInfo:GuzzleHttp\Psr7\Uri:private] => [host:GuzzleHttp\Psr7\Uri:private] => www.googleapis.com [port:GuzzleHttp\Psr7\Uri:private] => [path:GuzzleHttp\Psr7\Uri:private] => /upload/youtube/partner/v1/references [query:GuzzleHttp\Psr7\Uri:private] => onBehalfOfContentOwner=_hidden_content_owner_&uploadType=resumable [fragment:GuzzleHttp\Psr7\Uri:private] => [composedComponents:GuzzleHttp\Psr7\Uri:private] => https://www.googleapis.com/upload/youtube/partner/v1/references?onBehalfOfContentOwner=_hidden_content_owner_&uploadType=resumable ) [headers:GuzzleHttp\Psr7\Request:private] => Array ( [Host] => Array ( [0] => www.googleapis.com ) [X-Php-Expected-Class] => Array ( [0] => Google_Service_YouTubePartner_Reference ) [content-type] => Array ( [0] => application/json; charset=UTF-8 ) [content-length] => Array ( [0] => 52 ) [x-upload-content-type] => Array ( [0] => video/mp4 ) [x-upload-content-length] => Array ( [0] => 42647938 ) [expect] => Array ( [0] => ) [User-Agent] => Array ( [0] => google-api-php-client/2.12.6 ) [x-goog-api-client] => Array ( [0] => gl-php/7.4.33 gdcl/2.12.6 ) ) [headerNames:GuzzleHttp\Psr7\Request:private] => Array ( [content-type] => content-type [host] => Host [x-php-expected-class] => X-Php-Expected-Class [content-length] => content-length [x-upload-content-type] => x-upload-content-type [x-upload-content-length] => x-upload-content-length [expect] => expect [user-agent] => User-Agent [x-goog-api-client] => x-goog-api-client ) [protocol:GuzzleHttp\Psr7\Request:private] => 1.1 [stream:GuzzleHttp\Psr7\Request:private] => GuzzleHttp\Psr7\Stream Object ( [stream:GuzzleHttp\Psr7\Stream:private] => Resource id #122 [size:GuzzleHttp\Psr7\Stream:private] => 52 [seekable:GuzzleHttp\Psr7\Stream:private] => 1 [readable:GuzzleHttp\Psr7\Stream:private] => 1 [writable:GuzzleHttp\Psr7\Stream:private] => 1 [uri:GuzzleHttp\Psr7\Stream:private] => php://temp [customMetadata:GuzzleHttp\Psr7\Stream:private] => Array ( ) ) ) [2] => ) ) [2] => Array ( [file] => /Users/*********/projects/google-api/Google/vendor/google/apiclient/src/Task/Runner.php [line] => 187 [function] => call_user_func_array [args] => Array ( [0] => Array ( [0] => Google\Http\REST [1] => doExecute ) [1] => Array ( [0] => GuzzleHttp\Client Object ( [config:GuzzleHttp\Client:private] => Array ( [base_uri] => GuzzleHttp\Psr7\Uri Object ( [scheme:GuzzleHttp\Psr7\Uri:private] => https [userInfo:GuzzleHttp\Psr7\Uri:private] => [host:GuzzleHttp\Psr7\Uri:private] => www.googleapis.com [port:GuzzleHttp\Psr7\Uri:private] => [path:GuzzleHttp\Psr7\Uri:private] => [query:GuzzleHttp\Psr7\Uri:private] => [fragment:GuzzleHttp\Psr7\Uri:private] => [composedComponents:GuzzleHttp\Psr7\Uri:private] => ) [http_errors] => [handler] => GuzzleHttp\HandlerStack Object ( [handler:GuzzleHttp\HandlerStack:private] => Closure Object ( [static] => Array ( [default] => Closure Object ( [static] => Array ( [default] => GuzzleHttp\Handler\CurlMultiHandler Object ( [factory:GuzzleHttp\Handler\CurlMultiHandler:private] => GuzzleHttp\Handler\CurlFactory Object ( [handles:GuzzleHttp\Handler\CurlFactory:private] => Array ( ) [maxHandles:GuzzleHttp\Handler\CurlFactory:private] => 50 ) [selectTimeout:GuzzleHttp\Handler\CurlMultiHandler:private] => 1 [active:GuzzleHttp\Handler\CurlMultiHandler:private] => 0 [handles:GuzzleHttp\Handler\CurlMultiHandler:private] => Array ( ) [delays:GuzzleHttp\Handler\CurlMultiHandler:private] => Array ( ) [options:GuzzleHttp\Handler\CurlMultiHandler:private] => Array ( ) ) [sync] => GuzzleHttp\Handler\CurlHandler Object ( [factory:GuzzleHttp\Handler\CurlHandler:private] => GuzzleHttp\Handler\CurlFactory Object ( [handles:GuzzleHttp\Handler\CurlFactory:private] => Array ( [0] => Resource id #94 ) [maxHandles:GuzzleHttp\Handler\CurlFactory:private] => 3 ) ) ) [parameter] => Array ( [$request] => [$options] => ) ) [streaming] => GuzzleHttp\Handler\StreamHandler Object ( [lastHeaders:GuzzleHttp\Handler\StreamHandler:private] => Array ( ) ) ) [parameter] => Array ( [$request] => [$options] => ) ) [stack:GuzzleHttp\HandlerStack:private] => Array ( [0] => Array ( [0] => Closure Object ( [static] => Array ( [bodySummarizer] => ) [parameter] => Array ( [$handler] => ) ) [1] => http_errors ) [1] => Array ( [0] => Closure Object ( [parameter] => Array ( [$handler] => ) ) [1] => allow_redirects ) [2] => Array ( [0] => Closure Object ( [parameter] => Array ( [$handler] => ) ) [1] => cookies ) [3] => Array ( [0] => Closure Object ( [parameter] => Array ( [$handler] => ) ) [1] => prepare_body ) [4] => Array ( [0] => Google\Auth\Middleware\ScopedAccessTokenMiddleware Object ( [tokenFunc:Google\Auth\Middleware\ScopedAccessTokenMiddleware:private] => Closure Object ( [static] => Array ( [token] => Array ( [access_token] => ya29.a0AfB_byAtXxR7thImWmOzNKwJH2O1dTB92wO3pZAd2jLrogZ_iKfwlaw3qg3SK5eV25kX3iu_Z2fHBmN-dqBixjDK1U1qsNYJfWwiX5fWH4hPAZTvx_f-sASdMMitfu69UVjwv0y4F3GwBBllFnE4bLcCwclXrR_PRXZ7aCgYKAdISARESFQGOcNnCgMlFRJHTGjCGrdjifr2C1w0171 [expires_in] => 3599 [scope] => https://www.googleapis.com/auth/yt-analytics.readonly https://www.googleapis.com/auth/youtube.channel-memberships.creator https://www.googleapis.com/auth/youtube.upload https://www.googleapis.com/auth/youtube.force-ssl https://www.googleapis.com/auth/youtube.readonly https://www.googleapis.com/auth/youtubepartner-channel-audit https://www.googleapis.com/auth/youtube https://www.googleapis.com/auth/drive.metadata.readonly https://www.googleapis.com/auth/yt-analytics-monetary.readonly https://www.googleapis.com/auth/youtubepartner [token_type] => Bearer [created] => 1694777394 [refresh_token] => ****hidden refresh_token**** ) ) [this] => Google\AuthHandler\Guzzle7AuthHandler Object ( [cache:protected] => Google\Auth\Cache\MemoryCacheItemPool Object ( [items:Google\Auth\Cache\MemoryCacheItemPool:private] => Array ( [833d46aa77f3d802342527ed5eac827fa906592350cc03635fdf1775eb85f1f8] => Google\Auth\Cache\Item Object ( [key:Google\Auth\Cache\Item:private] => 833d46aa77f3d802342527ed5eac827fa906592350cc03635fdf1775eb85f1f8 [value:Google\Auth\Cache\Item:private] => ya29.a0AfB_byAtXxR7thImWmOzNKwJH2O1dTB92wO3pZAd2jLrogZ_iKfwlaw3qg3SK5eV25kX3iu_Z2fHBmN-dqBixjDK1U1qsNYJfWwiX5fWH4hPAZTvx_f-sASdMMitfu69UVjwv0y4F3GwBBllFnE4bLcCwclXrR_PRXZ7aCgYKAdISARESFQGOcNnCgMlFRJHTGjCGrdjifr2C1w0171 [expiration:Google\Auth\Cache\Item:private] => DateTime Object ( [date] => 2023-09-15 11:54:54.783449 [timezone_type] => 3 [timezone] => UTC ) [isHit:Google\Auth\Cache\Item:private] => 1 ) ) [deferredItems:Google\Auth\Cache\MemoryCacheItemPool:private] => ) [cacheConfig:protected] => Array ( ) ) [parameter] => Array ( [$scopes] => ) ) [scopes:Google\Auth\Middleware\ScopedAccessTokenMiddleware:private] => Array ( [0] => https://www.googleapis.com/auth/youtube https://www.googleapis.com/auth/youtube.force-ssl https://www.googleapis.com/auth/youtubepartner ) [maxKeyLength:Google\Auth\Middleware\ScopedAccessTokenMiddleware:private] => 64 [cacheConfig:Google\Auth\Middleware\ScopedAccessTokenMiddleware:private] => Array ( [lifetime] => 1500 [prefix] => ) [cache:Google\Auth\Middleware\ScopedAccessTokenMiddleware:private] => Google\Auth\Cache\MemoryCacheItemPool Object ( [items:Google\Auth\Cache\MemoryCacheItemPool:private] => Array ( [833d46aa77f3d802342527ed5eac827fa906592350cc03635fdf1775eb85f1f8] => Google\Auth\Cache\Item Object ( [key:Google\Auth\Cache\Item:private] => 833d46aa77f3d802342527ed5eac827fa906592350cc03635fdf1775eb85f1f8 [value:Google\Auth\Cache\Item:private] => ya29.a0AfB_byAtXxR7thImWmOzNKwJH2O1dTB92wO3pZAd2jLrogZ_iKfwlaw3qg3SK5eV25kX3iu_Z2fHBmN-dqBixjDK1U1qsNYJfWwiX5fWH4hPAZTvx_f-sASdMMitfu69UVjwv0y4F3GwBBllFnE4bLcCwclXrR_PRXZ7aCgYKAdISARESFQGOcNnCgMlFRJHTGjCGrdjifr2C1w0171 [expiration:Google\Auth\Cache\Item:private] => DateTime Object ( [date] => 2023-09-15 11:54:54.783449 [timezone_type] => 3 [timezone] => UTC ) [isHit:Google\Auth\Cache\Item:private] => 1 ) ) [deferredItems:Google\Auth\Cache\MemoryCacheItemPool:private] => ) ) [1] => google_auth ) ) [cached:GuzzleHttp\HandlerStack:private] => Closure Object ( [static] => Array ( [handler] => GuzzleHttp\RedirectMiddleware Object ( [nextHandler:GuzzleHttp\RedirectMiddleware:private] => Closure Object ( [static] => Array ( [handler] => GuzzleHttp\PrepareBodyMiddleware Object ( [nextHandler:GuzzleHttp\PrepareBodyMiddleware:private] => Closure Object ( [static] => Array ( [handler] => Closure Object ( [static] => Array ( [default] => Closure Object ( [static] => Array ( [default] => GuzzleHttp\Handler\CurlMultiHandler Object ( [factory:GuzzleHttp\Handler\CurlMultiHandler:private] => GuzzleHttp\Handler\CurlFactory Object ( [handles:GuzzleHttp\Handler\CurlFactory:private] => Array ( ) [maxHandles:GuzzleHttp\Handler\CurlFactory:private] => 50 ) [selectTimeout:GuzzleHttp\Handler\CurlMultiHandler:private] => 1 [active:GuzzleHttp\Handler\CurlMultiHandler:private] => 0 [handles:GuzzleHttp\Handler\CurlMultiHandler:private] => Array ( ) [delays:GuzzleHttp\Handler\CurlMultiHandler:private] => Array ( ) [options:GuzzleHttp\Handler\CurlMultiHandler:private] => Array ( ) ) [sync] => GuzzleHttp\Handler\CurlHandler Object ( [factory:GuzzleHttp\Handler\CurlHandler:private] => GuzzleHttp\Handler\CurlFactory Object ( [handles:GuzzleHttp\Handler\CurlFactory:private] => Array ( [0] => Resource id #94 ) [maxHandles:GuzzleHttp\Handler\CurlFactory:private] => 3 ) ) ) [parameter] => Array ( [$request] => [$options] => ) ) [streaming] => GuzzleHttp\Handler\StreamHandler Object ( [lastHeaders:GuzzleHttp\Handler\StreamHandler:private] => Array ( ) ) ) [parameter] => Array ( [$request] => [$options] => ) ) ) [this] => Google\Auth\Middleware\ScopedAccessTokenMiddleware Object ( [tokenFunc:Google\Auth\Middleware\ScopedAccessTokenMiddleware:private] => Closure Object ( [static] => Array ( [token] => Array ( [access_token] => ya29.a0AfB_byAtXxR7thImWmOzNKwJH2O1dTB92wO3pZAd2jLrogZ_iKfwlaw3qg3SK5eV25kX3iu_Z2fHBmN-dqBixjDK1U1qsNYJfWwiX5fWH4hPAZTvx_f-sASdMMitfu69UVjwv0y4F3GwBBllFnE4bLcCwclXrR_PRXZ7aCgYKAdISARESFQGOcNnCgMlFRJHTGjCGrdjifr2C1w0171 [expires_in] => 3599 [scope] => https://www.googleapis.com/auth/yt-analytics.readonly https://www.googleapis.com/auth/youtube.channel-memberships.creator https://www.googleapis.com/auth/youtube.upload https://www.googleapis.com/auth/youtube.force-ssl https://www.googleapis.com/auth/youtube.readonly https://www.googleapis.com/auth/youtubepartner-channel-audit https://www.googleapis.com/auth/youtube https://www.googleapis.com/auth/drive.metadata.readonly https://www.googleapis.com/auth/yt-analytics-monetary.readonly https://www.googleapis.com/auth/youtubepartner [token_type] => Bearer [created] => 1694777394 [refresh_token] => ****hidden refresh_token**** ) ) [this] => Google\AuthHandler\Guzzle7AuthHandler Object ( [cache:protected] => Google\Auth\Cache\MemoryCacheItemPool Object ( [items:Google\Auth\Cache\MemoryCacheItemPool:private] => Array ( [833d46aa77f3d802342527ed5eac827fa906592350cc03635fdf1775eb85f1f8] => Google\Auth\Cache\Item Object ( [key:Google\Auth\Cache\Item:private] => 833d46aa77f3d802342527ed5eac827fa906592350cc03635fdf1775eb85f1f8 [value:Google\Auth\Cache\Item:private] => ya29.a0AfB_byAtXxR7thImWmOzNKwJH2O1dTB92wO3pZAd2jLrogZ_iKfwlaw3qg3SK5eV25kX3iu_Z2fHBmN-dqBixjDK1U1qsNYJfWwiX5fWH4hPAZTvx_f-sASdMMitfu69UVjwv0y4F3GwBBllFnE4bLcCwclXrR_PRXZ7aCgYKAdISARESFQGOcNnCgMlFRJHTGjCGrdjifr2C1w0171 [expiration:Google\Auth\Cache\Item:private] => DateTime Object ( [date] => 2023-09-15 11:54:54.783449 [timezone_type] => 3 [timezone] => UTC ) [isHit:Google\Auth\Cache\Item:private] => 1 ) ) [deferredItems:Google\Auth\Cache\MemoryCacheItemPool:private] => ) [cacheConfig:protected] => Array ( ) ) [parameter] => Array ( [$scopes] => ) ) [scopes:Google\Auth\Middleware\ScopedAccessTokenMiddleware:private] => Array ( [0] => https://www.googleapis.com/auth/youtube https://www.googleapis.com/auth/youtube.force-ssl https://www.googleapis.com/auth/youtubepartner ) [maxKeyLength:Google\Auth\Middleware\ScopedAccessTokenMiddleware:private] => 64 [cacheConfig:Google\Auth\Middleware\ScopedAccessTokenMiddleware:private] => Array ( [lifetime] => 1500 [prefix] => ) [cache:Google\Auth\Middleware\ScopedAccessTokenMiddleware:private] => Google\Auth\Cache\MemoryCacheItemPool Object ( [items:Google\Auth\Cache\MemoryCacheItemPool:private] => Array ( [833d46aa77f3d802342527ed5eac827fa906592350cc03635fdf1775eb85f1f8] => Google\Auth\Cache\Item Object ( [key:Google\Auth\Cache\Item:private] => 833d46aa77f3d802342527ed5eac827fa906592350cc03635fdf1775eb85f1f8 [value:Google\Auth\Cache\Item:private] => ya29.a0AfB_byAtXxR7thImWmOzNKwJH2O1dTB92wO3pZAd2jLrogZ_iKfwlaw3qg3SK5eV25kX3iu_Z2fHBmN-dqBixjDK1U1qsNYJfWwiX5fWH4hPAZTvx_f-sASdMMitfu69UVjwv0y4F3GwBBllFnE4bLcCwclXrR_PRXZ7aCgYKAdISARESFQGOcNnCgMlFRJHTGjCGrdjifr2C1w0171 [expiration:Google\Auth\Cache\Item:private] => DateTime Object ( [date] => 2023-09-15 11:54:54.783449 [timezone_type] => 3 [timezone] => UTC ) [isHit:Google\Auth\Cache\Item:private] => 1 ) ) [deferredItems:Google\Auth\Cache\MemoryCacheItemPool:private] => ) ) [parameter] => Array ( [$request] => [$options] => ) ) ) ) [parameter] => Array ( [$request] => [$options] => ) ) ) [bodySummarizer] => ) [parameter] => Array ( [$request] => [$options] => ) ) ) [allow_redirects] => Array ( [max] => 5 [protocols] => Array ( [0] => http [1] => https ) [strict] => [referer] => [track_redirects] => ) [decode_content] => 1 [verify] => 1 [cookies] => [idn_conversion] => [headers] => Array ( [User-Agent] => GuzzleHttp/7 ) [auth] => scoped ) ) [1] => GuzzleHttp\Psr7\Request Object ( [method:GuzzleHttp\Psr7\Request:private] => POST [requestTarget:GuzzleHttp\Psr7\Request:private] => [uri:GuzzleHttp\Psr7\Request:private] => GuzzleHttp\Psr7\Uri Object ( [scheme:GuzzleHttp\Psr7\Uri:private] => https [userInfo:GuzzleHttp\Psr7\Uri:private] => [host:GuzzleHttp\Psr7\Uri:private] => www.googleapis.com [port:GuzzleHttp\Psr7\Uri:private] => [path:GuzzleHttp\Psr7\Uri:private] => /upload/youtube/partner/v1/references [query:GuzzleHttp\Psr7\Uri:private] => onBehalfOfContentOwner=_hidden_content_owner_&uploadType=resumable [fragment:GuzzleHttp\Psr7\Uri:private] => [composedComponents:GuzzleHttp\Psr7\Uri:private] => https://www.googleapis.com/upload/youtube/partner/v1/references?onBehalfOfContentOwner=_hidden_content_owner_&uploadType=resumable ) [headers:GuzzleHttp\Psr7\Request:private] => Array ( [Host] => Array ( [0] => www.googleapis.com ) [X-Php-Expected-Class] => Array ( [0] => Google_Service_YouTubePartner_Reference ) [content-type] => Array ( [0] => application/json; charset=UTF-8 ) [content-length] => Array ( [0] => 52 ) [x-upload-content-type] => Array ( [0] => video/mp4 ) [x-upload-content-length] => Array ( [0] => 42647938 ) [expect] => Array ( [0] => ) [User-Agent] => Array ( [0] => google-api-php-client/2.12.6 ) [x-goog-api-client] => Array ( [0] => gl-php/7.4.33 gdcl/2.12.6 ) ) [headerNames:GuzzleHttp\Psr7\Request:private] => Array ( [content-type] => content-type [host] => Host [x-php-expected-class] => X-Php-Expected-Class [content-length] => content-length [x-upload-content-type] => x-upload-content-type [x-upload-content-length] => x-upload-content-length [expect] => expect [user-agent] => User-Agent [x-goog-api-client] => x-goog-api-client ) [protocol:GuzzleHttp\Psr7\Request:private] => 1.1 [stream:GuzzleHttp\Psr7\Request:private] => GuzzleHttp\Psr7\Stream Object ( [stream:GuzzleHttp\Psr7\Stream:private] => Resource id #122 [size:GuzzleHttp\Psr7\Stream:private] => 52 [seekable:GuzzleHttp\Psr7\Stream:private] => 1 [readable:GuzzleHttp\Psr7\Stream:private] => 1 [writable:GuzzleHttp\Psr7\Stream:private] => 1 [uri:GuzzleHttp\Psr7\Stream:private] => php://temp [customMetadata:GuzzleHttp\Psr7\Stream:private] => Array ( ) ) ) [2] => ) ) ) [3] => Array ( [file] => /Users/*********/projects/google-api/Google/vendor/google/apiclient/src/Http/REST.php [line] => 75 [function] => run [class] => Google\Task\Runner [type] => -> [args] => Array ( ) ) [4] => Array ( [file] => /Users/*********/projects/google-api/Google/vendor/google/apiclient/src/Client.php [line] => 934 [function] => execute [class] => Google\Http\REST [type] => :: [args] => Array ( [0] => GuzzleHttp\Client Object ( [config:GuzzleHttp\Client:private] => Array ( [base_uri] => GuzzleHttp\Psr7\Uri Object ( [scheme:GuzzleHttp\Psr7\Uri:private] => https [userInfo:GuzzleHttp\Psr7\Uri:private] => [host:GuzzleHttp\Psr7\Uri:private] => www.googleapis.com [port:GuzzleHttp\Psr7\Uri:private] => [path:GuzzleHttp\Psr7\Uri:private] => [query:GuzzleHttp\Psr7\Uri:private] => [fragment:GuzzleHttp\Psr7\Uri:private] => [composedComponents:GuzzleHttp\Psr7\Uri:private] => ) [http_errors] => [handler] => GuzzleHttp\HandlerStack Object ( [handler:GuzzleHttp\HandlerStack:private] => Closure Object ( [static] => Array ( [default] => Closure Object ( [static] => Array ( [default] => GuzzleHttp\Handler\CurlMultiHandler Object ( [factory:GuzzleHttp\Handler\CurlMultiHandler:private] => GuzzleHttp\Handler\CurlFactory Object ( [handles:GuzzleHttp\Handler\CurlFactory:private] => Array ( ) [maxHandles:GuzzleHttp\Handler\CurlFactory:private] => 50 ) [selectTimeout:GuzzleHttp\Handler\CurlMultiHandler:private] => 1 [active:GuzzleHttp\Handler\CurlMultiHandler:private] => 0 [handles:GuzzleHttp\Handler\CurlMultiHandler:private] => Array ( ) [delays:GuzzleHttp\Handler\CurlMultiHandler:private] => Array ( ) [options:GuzzleHttp\Handler\CurlMultiHandler:private] => Array ( ) ) [sync] => GuzzleHttp\Handler\CurlHandler Object ( [factory:GuzzleHttp\Handler\CurlHandler:private] => GuzzleHttp\Handler\CurlFactory Object ( [handles:GuzzleHttp\Handler\CurlFactory:private] => Array ( [0] => Resource id #94 ) [maxHandles:GuzzleHttp\Handler\CurlFactory:private] => 3 ) ) ) [parameter] => Array ( [$request] => [$options] => ) ) [streaming] => GuzzleHttp\Handler\StreamHandler Object ( [lastHeaders:GuzzleHttp\Handler\StreamHandler:private] => Array ( ) ) ) [parameter] => Array ( [$request] => [$options] => ) ) [stack:GuzzleHttp\HandlerStack:private] => Array ( [0] => Array ( [0] => Closure Object ( [static] => Array ( [bodySummarizer] => ) [parameter] => Array ( [$handler] => ) ) [1] => http_errors ) [1] => Array ( [0] => Closure Object ( [parameter] => Array ( [$handler] => ) ) [1] => allow_redirects ) [2] => Array ( [0] => Closure Object ( [parameter] => Array ( [$handler] => ) ) [1] => cookies ) [3] => Array ( [0] => Closure Object ( [parameter] => Array ( [$handler] => ) ) [1] => prepare_body ) [4] => Array ( [0] => Google\Auth\Middleware\ScopedAccessTokenMiddleware Object ( [tokenFunc:Google\Auth\Middleware\ScopedAccessTokenMiddleware:private] => Closure Object ( [static] => Array ( [token] => Array ( [access_token] => ya29.a0AfB_byAtXxR7thImWmOzNKwJH2O1dTB92wO3pZAd2jLrogZ_iKfwlaw3qg3SK5eV25kX3iu_Z2fHBmN-dqBixjDK1U1qsNYJfWwiX5fWH4hPAZTvx_f-sASdMMitfu69UVjwv0y4F3GwBBllFnE4bLcCwclXrR_PRXZ7aCgYKAdISARESFQGOcNnCgMlFRJHTGjCGrdjifr2C1w0171 [expires_in] => 3599 [scope] => https://www.googleapis.com/auth/yt-analytics.readonly https://www.googleapis.com/auth/youtube.channel-memberships.creator https://www.googleapis.com/auth/youtube.upload https://www.googleapis.com/auth/youtube.force-ssl https://www.googleapis.com/auth/youtube.readonly https://www.googleapis.com/auth/youtubepartner-channel-audit https://www.googleapis.com/auth/youtube https://www.googleapis.com/auth/drive.metadata.readonly https://www.googleapis.com/auth/yt-analytics-monetary.readonly https://www.googleapis.com/auth/youtubepartner [token_type] => Bearer [created] => 1694777394 [refresh_token] => ****hidden refresh_token**** ) ) [this] => Google\AuthHandler\Guzzle7AuthHandler Object ( [cache:protected] => Google\Auth\Cache\MemoryCacheItemPool Object ( [items:Google\Auth\Cache\MemoryCacheItemPool:private] => Array ( [833d46aa77f3d802342527ed5eac827fa906592350cc03635fdf1775eb85f1f8] => Google\Auth\Cache\Item Object ( [key:Google\Auth\Cache\Item:private] => 833d46aa77f3d802342527ed5eac827fa906592350cc03635fdf1775eb85f1f8 [value:Google\Auth\Cache\Item:private] => ya29.a0AfB_byAtXxR7thImWmOzNKwJH2O1dTB92wO3pZAd2jLrogZ_iKfwlaw3qg3SK5eV25kX3iu_Z2fHBmN-dqBixjDK1U1qsNYJfWwiX5fWH4hPAZTvx_f-sASdMMitfu69UVjwv0y4F3GwBBllFnE4bLcCwclXrR_PRXZ7aCgYKAdISARESFQGOcNnCgMlFRJHTGjCGrdjifr2C1w0171 [expiration:Google\Auth\Cache\Item:private] => DateTime Object ( [date] => 2023-09-15 11:54:54.783449 [timezone_type] => 3 [timezone] => UTC ) [isHit:Google\Auth\Cache\Item:private] => 1 ) ) [deferredItems:Google\Auth\Cache\MemoryCacheItemPool:private] => ) [cacheConfig:protected] => Array ( ) ) [parameter] => Array ( [$scopes] => ) ) [scopes:Google\Auth\Middleware\ScopedAccessTokenMiddleware:private] => Array ( [0] => https://www.googleapis.com/auth/youtube https://www.googleapis.com/auth/youtube.force-ssl https://www.googleapis.com/auth/youtubepartner ) [maxKeyLength:Google\Auth\Middleware\ScopedAccessTokenMiddleware:private] => 64 [cacheConfig:Google\Auth\Middleware\ScopedAccessTokenMiddleware:private] => Array ( [lifetime] => 1500 [prefix] => ) [cache:Google\Auth\Middleware\ScopedAccessTokenMiddleware:private] => Google\Auth\Cache\MemoryCacheItemPool Object ( [items:Google\Auth\Cache\MemoryCacheItemPool:private] => Array ( [833d46aa77f3d802342527ed5eac827fa906592350cc03635fdf1775eb85f1f8] => Google\Auth\Cache\Item Object ( [key:Google\Auth\Cache\Item:private] => 833d46aa77f3d802342527ed5eac827fa906592350cc03635fdf1775eb85f1f8 [value:Google\Auth\Cache\Item:private] => ya29.a0AfB_byAtXxR7thImWmOzNKwJH2O1dTB92wO3pZAd2jLrogZ_iKfwlaw3qg3SK5eV25kX3iu_Z2fHBmN-dqBixjDK1U1qsNYJfWwiX5fWH4hPAZTvx_f-sASdMMitfu69UVjwv0y4F3GwBBllFnE4bLcCwclXrR_PRXZ7aCgYKAdISARESFQGOcNnCgMlFRJHTGjCGrdjifr2C1w0171 [expiration:Google\Auth\Cache\Item:private] => DateTime Object ( [date] => 2023-09-15 11:54:54.783449 [timezone_type] => 3 [timezone] => UTC ) [isHit:Google\Auth\Cache\Item:private] => 1 ) ) [deferredItems:Google\Auth\Cache\MemoryCacheItemPool:private] => ) ) [1] => google_auth ) ) [cached:GuzzleHttp\HandlerStack:private] => Closure Object ( [static] => Array ( [handler] => GuzzleHttp\RedirectMiddleware Object ( [nextHandler:GuzzleHttp\RedirectMiddleware:private] => Closure Object ( [static] => Array ( [handler] => GuzzleHttp\PrepareBodyMiddleware Object ( [nextHandler:GuzzleHttp\PrepareBodyMiddleware:private] => Closure Object ( [static] => Array ( [handler] => Closure Object ( [static] => Array ( [default] => Closure Object ( [static] => Array ( [default] => GuzzleHttp\Handler\CurlMultiHandler Object ( [factory:GuzzleHttp\Handler\CurlMultiHandler:private] => GuzzleHttp\Handler\CurlFactory Object ( [handles:GuzzleHttp\Handler\CurlFactory:private] => Array ( ) [maxHandles:GuzzleHttp\Handler\CurlFactory:private] => 50 ) [selectTimeout:GuzzleHttp\Handler\CurlMultiHandler:private] => 1 [active:GuzzleHttp\Handler\CurlMultiHandler:private] => 0 [handles:GuzzleHttp\Handler\CurlMultiHandler:private] => Array ( ) [delays:GuzzleHttp\Handler\CurlMultiHandler:private] => Array ( ) [options:GuzzleHttp\Handler\CurlMultiHandler:private] => Array ( ) ) [sync] => GuzzleHttp\Handler\CurlHandler Object ( [factory:GuzzleHttp\Handler\CurlHandler:private] => GuzzleHttp\Handler\CurlFactory Object ( [handles:GuzzleHttp\Handler\CurlFactory:private] => Array ( [0] => Resource id #94 ) [maxHandles:GuzzleHttp\Handler\CurlFactory:private] => 3 ) ) ) [parameter] => Array ( [$request] => [$options] => ) ) [streaming] => GuzzleHttp\Handler\StreamHandler Object ( [lastHeaders:GuzzleHttp\Handler\StreamHandler:private] => Array ( ) ) ) [parameter] => Array ( [$request] => [$options] => ) ) ) [this] => Google\Auth\Middleware\ScopedAccessTokenMiddleware Object ( [tokenFunc:Google\Auth\Middleware\ScopedAccessTokenMiddleware:private] => Closure Object ( [static] => Array ( [token] => Array ( [access_token] => ya29.a0AfB_byAtXxR7thImWmOzNKwJH2O1dTB92wO3pZAd2jLrogZ_iKfwlaw3qg3SK5eV25kX3iu_Z2fHBmN-dqBixjDK1U1qsNYJfWwiX5fWH4hPAZTvx_f-sASdMMitfu69UVjwv0y4F3GwBBllFnE4bLcCwclXrR_PRXZ7aCgYKAdISARESFQGOcNnCgMlFRJHTGjCGrdjifr2C1w0171 [expires_in] => 3599 [scope] => https://www.googleapis.com/auth/yt-analytics.readonly https://www.googleapis.com/auth/youtube.channel-memberships.creator https://www.googleapis.com/auth/youtube.upload https://www.googleapis.com/auth/youtube.force-ssl https://www.googleapis.com/auth/youtube.readonly https://www.googleapis.com/auth/youtubepartner-channel-audit https://www.googleapis.com/auth/youtube https://www.googleapis.com/auth/drive.metadata.readonly https://www.googleapis.com/auth/yt-analytics-monetary.readonly https://www.googleapis.com/auth/youtubepartner [token_type] => Bearer [created] => 1694777394 [refresh_token] => ****hidden refresh_token**** ) ) [this] => Google\AuthHandler\Guzzle7AuthHandler Object ( [cache:protected] => Google\Auth\Cache\MemoryCacheItemPool Object ( [items:Google\Auth\Cache\MemoryCacheItemPool:private] => Array ( [833d46aa77f3d802342527ed5eac827fa906592350cc03635fdf1775eb85f1f8] => Google\Auth\Cache\Item Object ( [key:Google\Auth\Cache\Item:private] => 833d46aa77f3d802342527ed5eac827fa906592350cc03635fdf1775eb85f1f8 [value:Google\Auth\Cache\Item:private] => ya29.a0AfB_byAtXxR7thImWmOzNKwJH2O1dTB92wO3pZAd2jLrogZ_iKfwlaw3qg3SK5eV25kX3iu_Z2fHBmN-dqBixjDK1U1qsNYJfWwiX5fWH4hPAZTvx_f-sASdMMitfu69UVjwv0y4F3GwBBllFnE4bLcCwclXrR_PRXZ7aCgYKAdISARESFQGOcNnCgMlFRJHTGjCGrdjifr2C1w0171 [expiration:Google\Auth\Cache\Item:private] => DateTime Object ( [date] => 2023-09-15 11:54:54.783449 [timezone_type] => 3 [timezone] => UTC ) [isHit:Google\Auth\Cache\Item:private] => 1 ) ) [deferredItems:Google\Auth\Cache\MemoryCacheItemPool:private] => ) [cacheConfig:protected] => Array ( ) ) [parameter] => Array ( [$scopes] => ) ) [scopes:Google\Auth\Middleware\ScopedAccessTokenMiddleware:private] => Array ( [0] => https://www.googleapis.com/auth/youtube https://www.googleapis.com/auth/youtube.force-ssl https://www.googleapis.com/auth/youtubepartner ) [maxKeyLength:Google\Auth\Middleware\ScopedAccessTokenMiddleware:private] => 64 [cacheConfig:Google\Auth\Middleware\ScopedAccessTokenMiddleware:private] => Array ( [lifetime] => 1500 [prefix] => ) [cache:Google\Auth\Middleware\ScopedAccessTokenMiddleware:private] => Google\Auth\Cache\MemoryCacheItemPool Object ( [items:Google\Auth\Cache\MemoryCacheItemPool:private] => Array ( [833d46aa77f3d802342527ed5eac827fa906592350cc03635fdf1775eb85f1f8] => Google\Auth\Cache\Item Object ( [key:Google\Auth\Cache\Item:private] => 833d46aa77f3d802342527ed5eac827fa906592350cc03635fdf1775eb85f1f8 [value:Google\Auth\Cache\Item:private] => ya29.a0AfB_byAtXxR7thImWmOzNKwJH2O1dTB92wO3pZAd2jLrogZ_iKfwlaw3qg3SK5eV25kX3iu_Z2fHBmN-dqBixjDK1U1qsNYJfWwiX5fWH4hPAZTvx_f-sASdMMitfu69UVjwv0y4F3GwBBllFnE4bLcCwclXrR_PRXZ7aCgYKAdISARESFQGOcNnCgMlFRJHTGjCGrdjifr2C1w0171 [expiration:Google\Auth\Cache\Item:private] => DateTime Object ( [date] => 2023-09-15 11:54:54.783449 [timezone_type] => 3 [timezone] => UTC ) [isHit:Google\Auth\Cache\Item:private] => 1 ) ) [deferredItems:Google\Auth\Cache\MemoryCacheItemPool:private] => ) ) [parameter] => Array ( [$request] => [$options] => ) ) ) ) [parameter] => Array ( [$request] => [$options] => ) ) ) [bodySummarizer] => ) [parameter] => Array ( [$request] => [$options] => ) ) ) [allow_redirects] => Array ( [max] => 5 [protocols] => Array ( [0] => http [1] => https ) [strict] => [referer] => [track_redirects] => ) [decode_content] => 1 [verify] => 1 [cookies] => [idn_conversion] => [headers] => Array ( [User-Agent] => GuzzleHttp/7 ) [auth] => scoped ) ) [1] => GuzzleHttp\Psr7\Request Object ( [method:GuzzleHttp\Psr7\Request:private] => POST [requestTarget:GuzzleHttp\Psr7\Request:private] => [uri:GuzzleHttp\Psr7\Request:private] => GuzzleHttp\Psr7\Uri Object ( [scheme:GuzzleHttp\Psr7\Uri:private] => https [userInfo:GuzzleHttp\Psr7\Uri:private] => [host:GuzzleHttp\Psr7\Uri:private] => www.googleapis.com [port:GuzzleHttp\Psr7\Uri:private] => [path:GuzzleHttp\Psr7\Uri:private] => /upload/youtube/partner/v1/references [query:GuzzleHttp\Psr7\Uri:private] => onBehalfOfContentOwner=_hidden_content_owner_&uploadType=resumable [fragment:GuzzleHttp\Psr7\Uri:private] => [composedComponents:GuzzleHttp\Psr7\Uri:private] => https://www.googleapis.com/upload/youtube/partner/v1/references?onBehalfOfContentOwner=_hidden_content_owner_&uploadType=resumable ) [headers:GuzzleHttp\Psr7\Request:private] => Array ( [Host] => Array ( [0] => www.googleapis.com ) [X-Php-Expected-Class] => Array ( [0] => Google_Service_YouTubePartner_Reference ) [content-type] => Array ( [0] => application/json; charset=UTF-8 ) [content-length] => Array ( [0] => 52 ) [x-upload-content-type] => Array ( [0] => video/mp4 ) [x-upload-content-length] => Array ( [0] => 42647938 ) [expect] => Array ( [0] => ) [User-Agent] => Array ( [0] => google-api-php-client/2.12.6 ) [x-goog-api-client] => Array ( [0] => gl-php/7.4.33 gdcl/2.12.6 ) ) [headerNames:GuzzleHttp\Psr7\Request:private] => Array ( [content-type] => content-type [host] => Host [x-php-expected-class] => X-Php-Expected-Class [content-length] => content-length [x-upload-content-type] => x-upload-content-type [x-upload-content-length] => x-upload-content-length [expect] => expect [user-agent] => User-Agent [x-goog-api-client] => x-goog-api-client ) [protocol:GuzzleHttp\Psr7\Request:private] => 1.1 [stream:GuzzleHttp\Psr7\Request:private] => GuzzleHttp\Psr7\Stream Object ( [stream:GuzzleHttp\Psr7\Stream:private] => Resource id #122 [size:GuzzleHttp\Psr7\Stream:private] => 52 [seekable:GuzzleHttp\Psr7\Stream:private] => 1 [readable:GuzzleHttp\Psr7\Stream:private] => 1 [writable:GuzzleHttp\Psr7\Stream:private] => 1 [uri:GuzzleHttp\Psr7\Stream:private] => php://temp [customMetadata:GuzzleHttp\Psr7\Stream:private] => Array ( ) ) ) [2] => [3] => Array ( ) [4] => ) ) [5] => Array ( [file] => /Users/*********/projects/google-api/Google/vendor/google/apiclient/src/Http/MediaFileUpload.php [line] => 319 [function] => execute [class] => Google\Client [type] => -> [args] => Array ( [0] => GuzzleHttp\Psr7\Request Object ( [method:GuzzleHttp\Psr7\Request:private] => POST [requestTarget:GuzzleHttp\Psr7\Request:private] => [uri:GuzzleHttp\Psr7\Request:private] => GuzzleHttp\Psr7\Uri Object ( [scheme:GuzzleHttp\Psr7\Uri:private] => https [userInfo:GuzzleHttp\Psr7\Uri:private] => [host:GuzzleHttp\Psr7\Uri:private] => www.googleapis.com [port:GuzzleHttp\Psr7\Uri:private] => [path:GuzzleHttp\Psr7\Uri:private] => /upload/youtube/partner/v1/references [query:GuzzleHttp\Psr7\Uri:private] => onBehalfOfContentOwner=_hidden_content_owner_&uploadType=resumable [fragment:GuzzleHttp\Psr7\Uri:private] => [composedComponents:GuzzleHttp\Psr7\Uri:private] => https://www.googleapis.com/upload/youtube/partner/v1/references?onBehalfOfContentOwner=_hidden_content_owner_&uploadType=resumable ) [headers:GuzzleHttp\Psr7\Request:private] => Array ( [Host] => Array ( [0] => www.googleapis.com ) [X-Php-Expected-Class] => Array ( [0] => Google_Service_YouTubePartner_Reference ) [content-type] => Array ( [0] => application/json; charset=UTF-8 ) [content-length] => Array ( [0] => 52 ) [x-upload-content-type] => Array ( [0] => video/mp4 ) [x-upload-content-length] => Array ( [0] => 42647938 ) [expect] => Array ( [0] => ) [User-Agent] => Array ( [0] => google-api-php-client/2.12.6 ) [x-goog-api-client] => Array ( [0] => gl-php/7.4.33 gdcl/2.12.6 ) ) [headerNames:GuzzleHttp\Psr7\Request:private] => Array ( [content-type] => content-type [host] => Host [x-php-expected-class] => X-Php-Expected-Class [content-length] => content-length [x-upload-content-type] => x-upload-content-type [x-upload-content-length] => x-upload-content-length [expect] => expect [user-agent] => User-Agent [x-goog-api-client] => x-goog-api-client ) [protocol:GuzzleHttp\Psr7\Request:private] => 1.1 [stream:GuzzleHttp\Psr7\Request:private] => GuzzleHttp\Psr7\Stream Object ( [stream:GuzzleHttp\Psr7\Stream:private] => Resource id #122 [size:GuzzleHttp\Psr7\Stream:private] => 52 [seekable:GuzzleHttp\Psr7\Stream:private] => 1 [readable:GuzzleHttp\Psr7\Stream:private] => 1 [writable:GuzzleHttp\Psr7\Stream:private] => 1 [uri:GuzzleHttp\Psr7\Stream:private] => php://temp [customMetadata:GuzzleHttp\Psr7\Stream:private] => Array ( ) ) ) [1] => ) ) [6] => Array ( [file] => /Users/*********/projects/google-api/Google/vendor/google/apiclient/src/Http/MediaFileUpload.php [line] => 289 [function] => fetchResumeUri [class] => Google\Http\MediaFileUpload [type] => -> [args] => Array ( ) ) [7] => Array ( [file] => /Users/*********/projects/google-api/Google/vendor/google/apiclient/src/Http/MediaFileUpload.php [line] => 126 [function] => getResumeUri [class] => Google\Http\MediaFileUpload [type] => -> [args] => Array ( ) ) [8] => Array ( [file] => /Users/*********/projects/google-api/Google/GoogleYouTubeContentIdAPI.php [line] => 205 [function] => nextChunk [class] => Google\Http\MediaFileUpload [type] => -> [args] => // stream data of the video ) ```
JrCaters commented 1 year ago

@yash30201 Thank you for reopen it. I was wondering about my full error, should I put in a file instead of a long message ? If yes what kind of file should I use ? Thanks

JrCaters commented 1 year ago

Hey guys,

Still having the same error (even with the v.2.15.1) but I think is neither the PHP Client library or my code the issue. Below you can see that I'm not the only one having the same issue and people are saying that they didn't change anything in their code too

https://issuetracker.google.com/issues/300280233 https://issuetracker.google.com/issues/300236995

I'll keep an eye of those issues and will let you know if Google answer

benrcole commented 1 year ago

I also had the same issue.

Sending the request through the library rather than getting the client and sending yourself is a workaround you could try, this works for me

On Mon, 18 Sep 2023 at 16:52, oolul @.***> wrote:

Hey guys,

Still having the same error (even with the v.2.15.1) but I think is neither the PHP Client library or my code the issue. Below you can see that I'm not the only one having the same issue and people are saying that they didn't change anything in their code too

https://issuetracker.google.com/issues/300280233 https://issuetracker.google.com/issues/300236995

I'll keep an eye of those issues and will let you know if Google answer

— Reply to this email directly, view it on GitHub https://github.com/googleapis/google-api-php-client/issues/2479#issuecomment-1723608661, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAWOZT2VVLQ7Y4ZLZACFOE3X3BN35ANCNFSM6AAAAAA2YBCBQQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

JrCaters commented 1 year ago

Sorry @benrcole I'm not sure to understand what you're suggesting.

I've tried to do it with the library (v2.14.0 and v2.15.1) and it failed. After that I tried to do manual requests myself and still having the same error at the same step of the process and I can tell you that I'm sure that the Authorization header is present on my request.

What I've tried to make sure my access_token was valid is to put a fake one when I try to fetch an asset or update the match policy and it failed so that confirms that my access_token is valid or at least for those endpoints...

Could you be more explicit of what works for you ? And are you doing a reference file upload too ?

Thanks

benrcole commented 1 year ago

I’ll reply with an example tomorrow. If I don’t send me a dm

On Mon, 18 Sep 2023 at 17:22, oolul @.***> wrote:

Sorry @benrcole https://github.com/benrcole I'm not sure to understand what you're suggesting.

I've tried to do it with the library (v2.14.0 and v2.15.1) and it failed. After that I tried to do manual requests myself and still having the same error at the same step of the process and I can tell you that I'm sure that the Authorization header is present on my request.

What I've tried to make sure my access_token was valid is to put a fake one when I try to fetch an asset or update the match policy and it failed so that confirms that my access_token is valid or at least for those endpoints...

Could you be more explicit of what works for you ? And are you doing a reference file upload too ?

Thanks

— Reply to this email directly, view it on GitHub https://github.com/googleapis/google-api-php-client/issues/2479#issuecomment-1723696165, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAWOZT6FY4QTYLDFKTZXBY3X3BRKDANCNFSM6AAAAAA2YBCBQQ . You are receiving this because you were mentioned.Message ID: @.***>

yash30201 commented 1 year ago

Hi @oolul ,

Sorry for the delay in response from my end. I've taken care of the code formatting by placing them in collapsible dropdown so no worries there.

Thanks for pointing the existing bug tickets in issue tracker. I see that those issue got resolved today from the backend engineering team. Can you try it and tell me if this issue is still occuring?

Meanwhile I'll take a look at your repro case and try to see what's happening there.

JrCaters commented 1 year ago

Hi @yash30201,

Yes I have tested it and it's working again. So all good, definitely something wrong on their side.

It's not my issue but as far I'm concerned you can close that issue. Thanks again for your time.

vpuentem commented 11 months ago

I'm having the same issue, my code was working and suddendly it started throwing the same error

aaronware commented 9 months ago

This may be due to an expired token and not being shown properly. I recently generated a new auth token and after an hour I started having an issue. By default, oauth2 token will expire. At that point you need to use a refresh token Not sure if this is everyone's issue but it was definitely mine

yash30201 commented 9 months ago

@vpuentem , can you please confirm if refreshing the token solves your problem?

yash30201 commented 8 months ago

Closing this due to inactivity. Please reopen if the issue still persists.