Artboard
Google auth

Save 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
POST
/otto/api/google-auth/credentials

Request Body

application/json

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

serviceAccountJson*
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-z]{2,}$
Formatemail

Response Body

application/json

application/json

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