Integration Credential

Test unsaved integration credential

Test an integration credential before it is created: Rossum attempts to obtain an access token from the third-party service using the submitted secret and, when the token carries the granted scopes, checks that all requested scopes were granted.

Nothing is stored — the credential does not have to exist. To test an existing (possibly edited) credential, use the test endpoint of the credential instead.

post/api/v1/integration_credentials/test

Request body

type'coupa_sand_oauth2' required

Type of the tested credential.

Example request

{
  "secret": {
    "client_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "client_secret": "s3cr3t-value",
    "base_api_url": "https://example.coupahost.com",
    "scope": "core.invoice.create core.common.read"
  }
}

Response

OK

status'ok' | 'failed' required

ok when a token was obtained and no requested scope is missing, failed otherwise.

errorstring nullable required

Human-readable description of the failure. null when the test passed.

granted_scopesstring[] nullable required

Scopes granted in the issued token. null when the token could not be obtained or the granted scopes could not be determined.

missing_scopesstring[] nullable required

Requested scopes that are not granted in the issued token. null when the granted scopes could not be determined.

Example response

{
  "status": "ok",
  "granted_scopes": [
    "core.common.read",
    "core.invoice.create"
  ],
  "missing_scopes": []
}

Changes

Changed in 1 of the 2 revisions of this API.1