OAuth2 Applications

Update OAuth2 application

Updates OAuth2 application information. Stored secrets (clientSecret, serviceKey, accessToken, externalAccount) read back as "******". A masked value is not the stored one - leave the field out of an update to keep the secret; sending the placeholder back is refused with 400.

put/v1/oauth2/{app}

Request

  • Base URL: https://your-emailengine-host
  • URL: https://your-emailengine-host/v1/oauth2/{app}
  • Auth: HTTP bearer

Path parameters

appstring required

OAuth2 application ID

Example:AAABhaBPHscAAAAH

Headers

x-ee-timeoutinteger

Request timeout in milliseconds. Raises the command timeout above the EENGINE_TIMEOUT default for a long-running request; a value below the default has no effect

Example:30000

Request body

namestring

Application name

descriptionstring

Application description

titlestring

Title for the application button

enabledboolean

Enable this app

clientSecretstring

Client secret for 3-legged OAuth2 applications

pubSubAppstring

Cloud Pub/Sub app for Gmail API webhooks

extraScopesstring[]

OAuth2 Extra Scopes

skipScopesstring[]

OAuth2 scopes to skip from the base set

googleWorkspaceAccountsboolean

Restrict OAuth2 login to Google Workspace accounts only

serviceClientEmailstring

Service Client Email for 2-legged OAuth2 applications

serviceKeystring

PEM formatted service secret for 2-legged OAuth2 applications

authoritystring

Authorization tenant value for Outlook OAuth2 applications

cloud'global' | 'gcc-high' | 'dod' | 'china'

Azure cloud type for Outlook OAuth2 applications

tenantstring

Example request

{
  "name": "My Gmail App",
  "description": "My cool app",
  "title": "App title",
  "enabled": true,
  "clientId": "52422112755-3uov8bjwlrullq122rdm6l8ui25ho7qf.apps.googleusercontent.com",
  "clientSecret": "boT7Q~dUljnfFdVuqpC11g8nGMjO8kpRAv-ZB",
  "pubSubApp": "AAAAAQAACnA",
  "extraScopes": [
    "User.Read"
  ],
  "skipScopes": [
    "SMTP.Send"
  ],
  "serviceClient": "7103296518315821565203",
  "googleProjectId": "project-name-425411",
  "googleTopicName": "ee-pub-12345",
  "googleSubscriptionName": "ee-sub-12345",
  "serviceClientEmail": "name@project-123.iam.gserviceaccount.com",
  "serviceKey": "-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgk...",
  "authority": "common",
  "cloud": "global",
  "tenant": "f8cdef31-a31e-4b4a-93e4-5f571e91255a",
  "redirectUrl": "https://myservice.com/oauth"
}

Response

Returns the updated OAuth2 application.

idstring required

OAuth2 app ID

updatedboolean

Was the application updated

Example response

{
  "id": "example",
  "updated": true
}

Changes

No recorded changes to this operation across all 1 revision of this API.