oauth_providers

The developer console lets you manage oauth_providers without doing API calls. See https://console.context.io/#settings/imapoauth.

Supported methods

List methods:GETPOST

Instance methods:GETDELETE

oauth_providers list

GET: List of OAuth providers configured

GET https://api.context.io/lite/oauth_providerstest it

Response body

[
  {
    "type": stringThe OAuth provider type, ie GMAIL_OAUTH2 or MSLIVECONNECT,
    "provider_consumer_key": stringThe OAuth provider consumer key,
    "provider_consumer_secret": stringThe OAuth provider consumer secret,
    "resource_url": stringThe URL of the OAuth provider resource,
  },
  ...
]

POST: Add a new OAuth2 provider

POST https://api.context.io/lite/oauth_providerstest it

If you are handling OAuth authorization yourself and pass the refresh token to Context.IO there are some third party requirements (e.g. Google, Microsoft) to take note of, see OAuth provider scope.

Parameters

nametypedescription
required:
typestringIdentification of the OAuth2 provider. Possible values are GMAIL_OAUTH2 and MSLIVECONNECT.
provider_consumer_keystringThe OAuth2 Client ID
provider_consumer_secretstringThe OAuth2 Client Secret

Response body

{
  "success": booleantrue if the oauth provider was successfully created,
  "provider_consumer_key": stringThe Provider Consumer Key for th OAuth provider,
  "resource_url": stringThe URL of the OAuth provider resource,
}

oauth_provider instance

GET: Information about a given OAuth provider

GET https://api.context.io/lite/oauth_providers/keytest it
keyThe consumer key for this external OAuth provider

Response body

{
  "type": stringThe OAuth provider type, ie GMAIL_OAUTH2 or MSLIVECONNECT,
  "provider_consumer_key": stringThe OAuth provider consumer key,
  "provider_consumer_secret": stringThe OAuth provider consumer secret,
  "resource_url": stringThe URL of the OAuth provider resource,
}

DELETE: Remove a given OAuth provider

DELETE https://api.context.io/lite/oauth_providers/keytest it
keyThe consumer key for this external OAuth provider

Response body

{
  "success": booleanWhether deletion succeeded,
}