Reference documentation and code samples for the Google Cloud PHP shared dependency, providing functionality useful to all components. Client class AnonymousCredentials.
Provides an anonymous set of credentials, which is useful for APIs which do
not require authentication.
Namespace
Google \ Cloud \ Core
Methods
fetchAuthToken
Fetches the auth token. In this case it returns a null value.
Parameter
Name
Description
httpHandler
callable
Returns
Type
Description
array
getCacheKey
Returns the cache key. In this case it returns a null value, disabling
caching.
Returns
Type
Description
string|null
getLastReceivedToken
Fetches the last received token. In this case, it returns the same null
auth token.
Returns
Type
Description
array
updateMetadata
This method has no effect for AnonymousCredentials.
Parameters
Name
Description
metadata
array
metadata hashmap
authUri
string
optional auth uri
httpHandler
callable
callback which delivers psr7 request
Returns
Type
Description
array
updated metadata hashmap
getQuotaProject
This method always returns null for AnonymousCredentials.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Cloud PHP shared dependency, providing functionality useful to all components. Client - Class AnonymousCredentials (1.64.2)\n\nVersion latestkeyboard_arrow_down\n\n- [1.64.2 (latest)](/php/docs/reference/cloud-core/latest/AnonymousCredentials)\n- [1.64.1](/php/docs/reference/cloud-core/1.64.1/AnonymousCredentials)\n- [1.63.0](/php/docs/reference/cloud-core/1.63.0/AnonymousCredentials)\n- [1.62.3](/php/docs/reference/cloud-core/1.62.3/AnonymousCredentials)\n- [1.61.0](/php/docs/reference/cloud-core/1.61.0/AnonymousCredentials)\n- [1.60.1](/php/docs/reference/cloud-core/1.60.1/AnonymousCredentials)\n- [1.59.1](/php/docs/reference/cloud-core/1.59.1/AnonymousCredentials)\n- [1.58.2](/php/docs/reference/cloud-core/1.58.2/AnonymousCredentials)\n- [1.53.0](/php/docs/reference/cloud-core/1.53.0/AnonymousCredentials)\n- [1.52.11](/php/docs/reference/cloud-core/1.52.11/AnonymousCredentials)\n- [1.51.2](/php/docs/reference/cloud-core/1.51.2/AnonymousCredentials)\n- [1.50.0](/php/docs/reference/cloud-core/1.50.0/AnonymousCredentials)\n- [1.49.3](/php/docs/reference/cloud-core/1.49.3/AnonymousCredentials)\n- [1.48.1](/php/docs/reference/cloud-core/1.48.1/AnonymousCredentials) \nReference documentation and code samples for the Google Cloud PHP shared dependency, providing functionality useful to all components. Client class AnonymousCredentials.\n\nProvides an anonymous set of credentials, which is useful for APIs which do\nnot require authentication.\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Core\n\nMethods\n-------\n\n### fetchAuthToken\n\nFetches the auth token. In this case it returns a null value.\n\n### getCacheKey\n\nReturns the cache key. In this case it returns a null value, disabling\ncaching.\n\n### getLastReceivedToken\n\nFetches the last received token. In this case, it returns the same null\nauth token.\n\n### updateMetadata\n\nThis method has no effect for AnonymousCredentials.\n\n### getQuotaProject\n\nThis method always returns null for AnonymousCredentials."]]