Try a credential against the provider without storing it
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_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","credentials":{},"settings":{}}'};
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_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "credentials": {}, "settings": {} }'Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Provider slug
Request Bodyrequired
Section titled “Request Bodyrequired”A credential to try against the provider without storing anything.
object
Authentication method selected from the provider catalog.
Connection whose stored secret to use when credentials is omitted.
Complete write-only input for the selected authentication method. Omit
it to try the secret connection_id already holds.
object
Provider connection values that do not contain secrets.
object
Responses
Section titled “Responses”Provider verdict on the credential
The result of checking a credential. A rejection is the answer to the
question asked, so it is ok: false rather than an error status.
object
On failure, the sanitized reason. On success, absent when the provider accepted the credential, or a note on what was checked when the provider cannot check credentials without side effects.
Whether the credential passed the check. When message is present on
success, the provider was not contacted and message says what was
checked.
Example generated
{ "message": "example", "ok": true}Invalid provider configuration
Unknown provider or connection