from engini import Engini
client = Engini() # reads ENGINI_API_KEY
# state is the value returned with the sign-in URL
status = client.connections.get_sign_in_status(state)import { Engini } from "@engini/sdk";
const client = new Engini(); // reads ENGINI_API_KEY
// state is the value returned with the sign-in URL
const status = await client.connections.getSignInStatus(state);# polls the sign-in status, then creates the connection
engini connections oauth-complete outlook --auth 0 --state <state>const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.engini.io/v1/connections/sign-in-status/{state}', 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/connections/sign-in-status/{state}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.engini.io/v1/connections/sign-in-status/{state}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.engini.io/v1/connections/sign-in-status/{state}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.engini.io/v1/connections/sign-in-status/{state}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": "<string>",
"fieldOptions": {},
"derivedFields": [
"<string>"
],
"createOutcome": "<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>"
}
]
}Get sign-in status
Token-free second half of the OAuth pairing with POST /connections/get-sign-in-url. Poll until status is no longer pending, then create the connection with oauthState - the server reads the credentials from the sign-in itself, so no provider token is ever returned here.
status describes the sign-in: pending, signed_in, failed, cancelled, or expired for a state that is unknown, belongs to another account or is more than five minutes old. createOutcome reports a create already made with this state (connected or failed) and is kept separate, so a failed create can be retried while status is signed_in. Once signed in, fieldOptions carries any per-field option lists the connector offers, and derivedFields names the connection fields the server fills from the sign-in - a client need not ask the user for them.
from engini import Engini
client = Engini() # reads ENGINI_API_KEY
# state is the value returned with the sign-in URL
status = client.connections.get_sign_in_status(state)import { Engini } from "@engini/sdk";
const client = new Engini(); // reads ENGINI_API_KEY
// state is the value returned with the sign-in URL
const status = await client.connections.getSignInStatus(state);# polls the sign-in status, then creates the connection
engini connections oauth-complete outlook --auth 0 --state <state>const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.engini.io/v1/connections/sign-in-status/{state}', 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/connections/sign-in-status/{state}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.engini.io/v1/connections/sign-in-status/{state}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.engini.io/v1/connections/sign-in-status/{state}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.engini.io/v1/connections/sign-in-status/{state}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": "<string>",
"fieldOptions": {},
"derivedFields": [
"<string>"
],
"createOutcome": "<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
Path Parameters
The state value returned when the sign-in URL was generated.
Response
The sign-in status.
Token-free status of an OAuth sign-in started with get-sign-in-url. Carries no provider token.
Outcome of the token exchange: pending, signed_in, failed, cancelled or expired (unknown, not yours, or older than the sign-in window).
Per-field option lists the connector discovered after sign-in, keyed by connection field name. Empty until the sign-in completes, and for connectors that supply none.
Show child attributes
Show child attributes
Connection field names the server fills from the sign-in, so a client need not ask for them. Empty until the sign-in completes.
Outcome of the follow-up connection create, reported separately from Status: connected or failed, or null when no create has run yet. A failed create can be retried with the same sign-in while Status is signed_in.