Artboard
Google auth

Save Google Auth Credentials

POST
/otto/api/google-auth/credentials

Save Google Auth Credentials

Save or update Google service account credentials for Google Groups lookup. These credentials are used to fetch a user's Google Groups during OAuth authentication.

Required:

  • A Google Cloud service account with domain-wide delegation
  • The Google Workspace admin email for impersonation

Request Body

POST /otto/api/google-auth/credentials Request body

application/json
  1. body
adminEmail*string

Admin email for domain-wide delegation

Match^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
Formatemail
serviceAccountJson*

Response Body

POST /otto/api/google-auth/credentials Positive response

application/json
  1. response
messages*array<>
response*
Example Request
curl -X POST 'https://your.server.net/otto/api/google-auth/credentials' \  -H 'Content-Type: application/json' \  -d '{  "adminEmail": "user@example.com",  "serviceAccountJson": {    "auth_provider_x509_cert_url": "http://example.com",    "auth_uri": "http://example.com",    "client_email": "user@example.com",    "client_id": "string",    "client_x509_cert_url": "http://example.com",    "private_key": "string",    "private_key_id": "string",    "project_id": "string",    "token_uri": "http://example.com",    "type": "service_account"  }}'
Example Response
{  "messages": [    {      "code": 0,      "text": "ok"    }  ],  "response": {}}

Was this page helpful?