Resolve deterministic login option
curl --request GET \
--url https://api.openworklabs.com/v1/auth/login-optionsimport requests
url = "https://api.openworklabs.com/v1/auth/login-options"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.openworklabs.com/v1/auth/login-options', 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.openworklabs.com/v1/auth/login-options",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.openworklabs.com/v1/auth/login-options"
req, _ := http.NewRequest("GET", url, nil)
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.openworklabs.com/v1/auth/login-options")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openworklabs.com/v1/auth/login-options")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"email": "jsmith@example.com",
"nextStep": "sso",
"allowPublicSignup": true,
"allowInvitationSignup": true,
"offerGoogleOnPassword": true,
"organizationSlug": "<string>",
"signInPath": "<string>",
"signInUrl": "<string>",
"organizationName": "<string>",
"ssoRequired": true,
"alternativeStep": "google",
"ssoProviders": [
{
"providerId": "<string>",
"name": "<string>",
"kind": "oidc"
}
]
}{
"error": "invalid_request"
}{
"error": "bot_verification_failed",
"message": "<string>"
}{
"error": "rate_limited",
"message": "<string>"
}Authentication
Resolve deterministic login option
Returns the deterministic next authentication step for an email address. SSO is preferred before Google, password, GitHub compatibility, and new account creation. When the SSO organization does not restrict its domain, the SSO step also carries alternativeStep (the usual method), ssoRequired and organizationName, and a valid pending invitation to another organization skips the domain’s SSO.
GET
/
v1
/
auth
/
login-options
Resolve deterministic login option
curl --request GET \
--url https://api.openworklabs.com/v1/auth/login-optionsimport requests
url = "https://api.openworklabs.com/v1/auth/login-options"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.openworklabs.com/v1/auth/login-options', 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.openworklabs.com/v1/auth/login-options",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.openworklabs.com/v1/auth/login-options"
req, _ := http.NewRequest("GET", url, nil)
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.openworklabs.com/v1/auth/login-options")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openworklabs.com/v1/auth/login-options")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"email": "jsmith@example.com",
"nextStep": "sso",
"allowPublicSignup": true,
"allowInvitationSignup": true,
"offerGoogleOnPassword": true,
"organizationSlug": "<string>",
"signInPath": "<string>",
"signInUrl": "<string>",
"organizationName": "<string>",
"ssoRequired": true,
"alternativeStep": "google",
"ssoProviders": [
{
"providerId": "<string>",
"name": "<string>",
"kind": "oidc"
}
]
}{
"error": "invalid_request"
}{
"error": "bot_verification_failed",
"message": "<string>"
}{
"error": "rate_limited",
"message": "<string>"
}Query Parameters
Response
Login option resolved successfully.
Was this page helpful?