from engini import Engini
client = Engini() # reads ENGINI_API_KEY
# source_authentication_id is the OAuth2 method id from auth_providers.sources()
# secret slots are write-only: a read returns has_value, never the value
provider = client.auth_providers.create(
provider_name="Acme Salesforce",
application_id=17,
source_authentication_id=2,
field_values={"Key1": "your-client-id", "Key2": "your-client-secret"},
)import { Engini } from "@engini/sdk";
const client = new Engini(); // reads ENGINI_API_KEY
// sourceAuthenticationId is the OAuth2 method id from authProviders.sources()
// secret slots are write-only: a read returns hasValue, never the value
const provider = await client.authProviders.create({
providerName: "Acme Salesforce",
applicationId: 17,
sourceAuthenticationId: 2,
isDefault: false,
isSandbox: false,
fieldValues: { Key1: "your-client-id", Key2: "your-client-secret" },
});# --field-stdin keeps the secret out of your shell history
echo "your-client-secret" | engini connections auth-providers create \
--app salesforce --name "Acme Salesforce" --field Key1=your-client-id --field-stdin Key2const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
providerName: '<string>',
applicationId: 123,
sourceAuthenticationId: 123,
isDefault: true,
isSandbox: true,
scopesOverride: '<string>',
extraOptions: '<string>',
fieldValues: {}
})
};
fetch('https://api.engini.io/v1/auth-providers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.engini.io/v1/auth-providers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'providerName' => '<string>',
'applicationId' => 123,
'sourceAuthenticationId' => 123,
'isDefault' => true,
'isSandbox' => true,
'scopesOverride' => '<string>',
'extraOptions' => '<string>',
'fieldValues' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.engini.io/v1/auth-providers"
payload := strings.NewReader("{\n \"providerName\": \"<string>\",\n \"applicationId\": 123,\n \"sourceAuthenticationId\": 123,\n \"isDefault\": true,\n \"isSandbox\": true,\n \"scopesOverride\": \"<string>\",\n \"extraOptions\": \"<string>\",\n \"fieldValues\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.engini.io/v1/auth-providers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"providerName\": \"<string>\",\n \"applicationId\": 123,\n \"sourceAuthenticationId\": 123,\n \"isDefault\": true,\n \"isSandbox\": true,\n \"scopesOverride\": \"<string>\",\n \"extraOptions\": \"<string>\",\n \"fieldValues\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.engini.io/v1/auth-providers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"providerName\": \"<string>\",\n \"applicationId\": 123,\n \"sourceAuthenticationId\": 123,\n \"isDefault\": true,\n \"isSandbox\": true,\n \"scopesOverride\": \"<string>\",\n \"extraOptions\": \"<string>\",\n \"fieldValues\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"providerName": "<string>",
"applicationId": 123,
"sourceAuthenticationId": 123,
"isDefault": true,
"isSandbox": true,
"status": 123,
"connectorRemoved": true,
"noLongerSupported": true,
"connectionCount": 123,
"fields": [
{
"slot": "<string>",
"isPassword": true,
"isRequired": true,
"isReadOnly": true,
"inputType": 0,
"minValue": 123,
"maxValue": 123,
"label": "<string>",
"tooltip": "<string>",
"placeholder": "<string>",
"value": "<string>",
"hasValue": true
}
],
"fieldsNeedReview": true,
"applicationName": "<string>",
"applicationLogo": "<string>",
"sourceAuthenticationName": "<string>",
"scopesOverride": "<string>",
"extraOptions": "<string>"
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}Create an auth provider.
Fills the “Set on provider” fields of one authentication method of a published connector once, for every connection signed in through the provider. The method must allow auth providers and be an OAuth2 method. Password field values are write-only. clientId and clientSecret are not accepted (400): where a connector lets you bring your own OAuth client, it marks those fields “Set on provider” and they go in fieldValues.
from engini import Engini
client = Engini() # reads ENGINI_API_KEY
# source_authentication_id is the OAuth2 method id from auth_providers.sources()
# secret slots are write-only: a read returns has_value, never the value
provider = client.auth_providers.create(
provider_name="Acme Salesforce",
application_id=17,
source_authentication_id=2,
field_values={"Key1": "your-client-id", "Key2": "your-client-secret"},
)import { Engini } from "@engini/sdk";
const client = new Engini(); // reads ENGINI_API_KEY
// sourceAuthenticationId is the OAuth2 method id from authProviders.sources()
// secret slots are write-only: a read returns hasValue, never the value
const provider = await client.authProviders.create({
providerName: "Acme Salesforce",
applicationId: 17,
sourceAuthenticationId: 2,
isDefault: false,
isSandbox: false,
fieldValues: { Key1: "your-client-id", Key2: "your-client-secret" },
});# --field-stdin keeps the secret out of your shell history
echo "your-client-secret" | engini connections auth-providers create \
--app salesforce --name "Acme Salesforce" --field Key1=your-client-id --field-stdin Key2const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
providerName: '<string>',
applicationId: 123,
sourceAuthenticationId: 123,
isDefault: true,
isSandbox: true,
scopesOverride: '<string>',
extraOptions: '<string>',
fieldValues: {}
})
};
fetch('https://api.engini.io/v1/auth-providers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.engini.io/v1/auth-providers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'providerName' => '<string>',
'applicationId' => 123,
'sourceAuthenticationId' => 123,
'isDefault' => true,
'isSandbox' => true,
'scopesOverride' => '<string>',
'extraOptions' => '<string>',
'fieldValues' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.engini.io/v1/auth-providers"
payload := strings.NewReader("{\n \"providerName\": \"<string>\",\n \"applicationId\": 123,\n \"sourceAuthenticationId\": 123,\n \"isDefault\": true,\n \"isSandbox\": true,\n \"scopesOverride\": \"<string>\",\n \"extraOptions\": \"<string>\",\n \"fieldValues\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.engini.io/v1/auth-providers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"providerName\": \"<string>\",\n \"applicationId\": 123,\n \"sourceAuthenticationId\": 123,\n \"isDefault\": true,\n \"isSandbox\": true,\n \"scopesOverride\": \"<string>\",\n \"extraOptions\": \"<string>\",\n \"fieldValues\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.engini.io/v1/auth-providers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"providerName\": \"<string>\",\n \"applicationId\": 123,\n \"sourceAuthenticationId\": 123,\n \"isDefault\": true,\n \"isSandbox\": true,\n \"scopesOverride\": \"<string>\",\n \"extraOptions\": \"<string>\",\n \"fieldValues\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"providerName": "<string>",
"applicationId": 123,
"sourceAuthenticationId": 123,
"isDefault": true,
"isSandbox": true,
"status": 123,
"connectorRemoved": true,
"noLongerSupported": true,
"connectionCount": 123,
"fields": [
{
"slot": "<string>",
"isPassword": true,
"isRequired": true,
"isReadOnly": true,
"inputType": 0,
"minValue": 123,
"maxValue": 123,
"label": "<string>",
"tooltip": "<string>",
"placeholder": "<string>",
"value": "<string>",
"hasValue": true
}
],
"fieldsNeedReview": true,
"applicationName": "<string>",
"applicationLogo": "<string>",
"sourceAuthenticationName": "<string>",
"scopesOverride": "<string>",
"extraOptions": "<string>"
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}Authorizations
Enter your JWT token
Body
The provider to create.
Creates an auth provider.
The account's label for the provider.
The application (published connector) to attach the provider to.
The authentication method of that application; it must allow auth providers.
Make this the application's default provider; it replaces any other default of the application.
Whether the provider is for the vendor's sandbox environment.
Scopes that replace the method's own scope option.
Additional non-URL OAuth options as a JSON object of strings (for example tenant_id).
Values for the source method's "Set on provider" fields, keyed by slot (Key1..Key10, ApiUser, ApiPassword, BaseUrl). Password values are write-only.
Show child attributes
Show child attributes
Response
The created auth provider.
An account's auth provider for one authentication method of one application: the values of the method's "Set on provider" connection fields, filled once and used by every connection signed in through it. A password field's value is write-only and never appears in a response.
Auth provider id.
The account's label for the provider.
The application (published connector) the provider belongs to.
The authentication method of the application this provider supplies an OAuth client for.
Whether this is the application's default provider: new connections to the application preselect it and its method. At most one per application.
Whether the provider is for the vendor's sandbox environment.
1 = active, 0 = disabled (no new sign-ins).
True when the application has been removed; the provider can then only be deleted.
True when the connector no longer allows auth providers on this method. Connections already signed in keep working; new sign-ins are refused.
Number of connections signed in through this provider.
The source method's "Set on provider" connection fields and their values on this provider. A password field never carries its value - only HasValue.
Show child attributes
Show child attributes
True when the provider fields need attention: the connector changed which fields are set on the provider (or whether one is secret) since the values were entered, or a required value is missing.
The application's name, when it is still available.
The application's logo file, when it is still available.
Display name of that authentication method.
Scopes that replace the method's own scope option; null keeps the method's scopes.
Additional non-URL OAuth options as a JSON object of strings.