I am looking for an API to add authorized Javascript origins and redirect URIs to an existing OAuth2 client id (Web application). So basically an API for the configuration settings in the GCP console under API & Services -> Credentials -> OAuth2 client ids.
Does someone know of such an API?
Hi @RiyaAgarwal,
There isn't a direct API to modify the authorized JavaScript origins and redirect URIs of an existing OAuth 2.0 client ID in the Google Cloud Console via the same interface you see. The Google Cloud Console's UI is not directly exposed as a programmatic API.
Instead, you need to use the Google Cloud Resource Manager API and the Admin SDK. This involves creating and managing the OAuth 2.0 client ID as a resource and updating its configuration.
Here's a breakdown of the process and the relevant APIs:
project_id
and the client_id
itself. You can find these information in the Google Cloud Console under API & Services -> Credentials.In summary, while a direct API for modifying existing OAuth 2.0 client ID configurations is currently unavailable, alternative strategies exist to manage access and configuration. The optimal solution will depend on your specific needs, technical expertise, and security requirements. Prioritize security and carefully consider the effort involved before implementing a custom solution.
I hope the above information is helpful.