Skip to main content
POST
Test a custom API connector

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Custom API connector test request

access_token
string

Credential to test. Required unless connection_id supplies the stored one, which it does only for a request to the connector's stored origins.

Example:

"sk-live-..."

auth_custom_header_name
string

Header name for auth_method custom_header.

Example:

"X-Api-Key"

auth_header_prefix
string

Prefix for the Authorization header value when auth_method is header.

Example:

"Bearer"

auth_method
enum<string>

Where the credential is placed. See the create request for each method. Defaults to header.

Available options:
header,
url_path,
query_param,
custom_header
Example:

"header"

auth_query_param_name
string

Query parameter name for auth_method query_param.

Example:

"api_key"

auth_url_path_template
string

Path template for auth_method url_path.

Example:

"/bot{token}"

base_api_url
string

Base URL of the provider API. Used to build the request when auth_method is url_path.

Example:

"https://api.acme.example"

connection_id
string

Existing custom API connector to test. When set, omitted or blank fields fall back to the connector's stored credential and settings, so a stored connector can be re-tested without resending its token. The stored credential is only sent to the connector's stored base_api_url or test_url origin (scheme, host and port); testing against any other origin needs access_token.

Example:

"conn_abc123"

test_url
string

URL fetched with the credential attached. For auth_method url_path give a path relative to base_api_url (such as /me); the request joins base_api_url, the token path and this value, so an absolute URL here would be appended to the base URL. For every other method give an absolute URL. Required unless connection_id supplies a stored test URL. URLs that resolve to internal addresses are rejected.

Example:

"https://api.acme.example/me"

Response

Success

Custom API connector test response

result
object
required

Test outcome.

Example: