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,
"organizationSlug": "<string>",
"signInPath": "<string>",
"signInUrl": "<string>",
"organizationName": "<string>",
"ssoRequired": true,
"alternativeStep": "google"
}{
"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 has ssoPerOrganization on and 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,
"organizationSlug": "<string>",
"signInPath": "<string>",
"signInUrl": "<string>",
"organizationName": "<string>",
"ssoRequired": true,
"alternativeStep": "google"
}{
"error": "invalid_request"
}{
"error": "bot_verification_failed",
"message": "<string>"
}{
"error": "rate_limited",
"message": "<string>"
}Query Parameters
Pattern:
^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$Minimum string length:
1Response
Login option resolved successfully.
Pattern:
^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$nextStep
Option 1 · stringOption 2 · stringOption 3 · stringOption 4 · stringOption 5 · string
required
Allowed value:
"sso"Allowed value:
"google"Was this page helpful?