Try a credential against the provider without storing it
POST
/v1/integrations/{provider}/test-connection
const url = 'https://api.adversarial.com/api/v1/integrations/example/test-connection';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"auth_method":"api_key","connection":{},"credentials":{},"installation_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.adversarial.com/api/v1/integrations/example/test-connection \ --header 'Content-Type: application/json' \ --data '{ "auth_method": "api_key", "connection": {}, "credentials": {}, "installation_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”provider
required
string
Provider slug
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
A credential to try against the provider without storing anything.
object
auth_method
required
Authentication method selected from the provider catalog.
string
connection
required
Provider connection values that do not contain secrets.
object
credentials
Complete write-only input for the selected authentication method. Omit
it to try the secret installation_id already holds.
object
installation_id
Installation whose stored secret to use when credentials is omitted.
string | null format: uuid
Responses
Section titled “Responses”Provider verdict on the credential
Media typeapplication/json
The provider’s verdict on a credential. A rejection is the answer to the
question asked, so it is ok: false rather than an error status.
object
message
Sanitized reason for a rejection; absent when the provider accepted.
string | null
ok
required
Whether the provider accepted the credential.
boolean
Examplegenerated
{ "message": "example", "ok": true}Invalid provider configuration
Unknown provider or installation