OAuth2 Applications

List OAuth2 applications

Lists registered OAuth2 applications

get/v1/oauth2

Request

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

Query parameters

pageinteger

Page number (zero indexed, so use 0 for first page)

pageSizeinteger

How many entries per page

Example:20

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

Response

Returns a page of OAuth2 applications.

totalinteger

How many matching entries

pageinteger

Current page (0-based index)

pagesinteger

Total page count

Example response

{
  "total": 120,
  "pages": 24,
  "apps": [
    {
      "id": "AAABhaBPHscAAAAH",
      "name": "My OAuth2 App",
      "description": "App description",
      "title": "App title",
      "provider": "gmail",
      "enabled": true,
      "created": "2021-02-17T13:43:18.860Z",
      "updated": "2021-02-17T13:43:18.860Z",
      "includeInListing": true,
      "clientId": "4f05f488-d858-4f2c-bd12-1039062612fe",
      "clientSecret": "******",
      "authority": "common",
      "redirectUrl": "https://myservice.com/oauth",
      "serviceClient": "9103965568215821627203",
      "googleProjectId": "project-name-425411",
      "googleTopicName": "ee-pub-12345",
      "googleSubscriptionName": "ee-sub-12345",
      "serviceClientEmail": "name@project-123.iam.gserviceaccount.com",
      "serviceKey": "******",
      "extraScopes": [
        "https://graph.microsoft.com/.default"
      ],
      "skipScopes": [
        "SMTP.Send"
      ],
      "baseScopes": "imap",
      "pubSubApp": "AAAAAQAACnA",
      "authMethod": "serviceKey",
      "cloud": "global",
      "tenant": "f8cdef31-a31e-4b4a-93e4-5f571e91255a",
      "externalAccount": "******",
      "accessToken": "******",
      "pubSubTopic": "projects/project-name/topics/ee-pub-12345",
      "pubSubSubscription": "projects/project-name/subscriptions/ee-sub-12345",
      "pubSubIamPolicy": true,
      "lastError": {
        "response": "Token request failed for gmail (refresh_token, HTTP 400): invalid_grant - Token has been expired or revoked.",
        "description": "Authentication failed",
        "serverResponseCode": "OauthRenewError",
        "tokenRequest": {
          "url": "https://oauth2.googleapis.com/token",
          "method": "post",
          "grant": "refresh_token",
          "provider": "gmail",
          "status": 400,
          "clientId": "1023289917884-h3nu00e9cb7h252e24c23sv19l8k57ah.apps.googleusercontent.com",
          "clientSecret": "GOCSPX...V-Da",
          "authority": "common",
          "serviceClient": "113328088575113530522",
          "signer": "serviceKey",
          "googleProjectId": "project-name-425411",
          "serviceClientEmail": "service-account@project-name-425411.iam.gserviceaccount.com",
          "code": "AAABhaBPHscAAAAH",
          "error": "fetch failed",
          "errorCode": "ECONNREFUSED",
          "flag": {
            "message": "Please verify the OAuth2 application credentials",
            "code": "INVALID_CLIENT_SECRET",
            "url": "https://console.developers.google.com/"
          },
          "userFlag": {
            "message": "The grant for this account has been revoked"
          },
          "scopes": [
            "https://mail.google.com/"
          ],
          "response": {
            "error": "invalid_grant",
            "error_description": "Bad Request"
          }
        }
      },
      "pubSubError": {
        "message": "Failed to process subscription loop",
        "description": "Subscription not found"
      }
    }
  ]
}

Changes

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