Authenticate
curl --request POST \
--url https://api-umbrella.io/api/services/auth \
--header 'Api-Key: <api-key>' \
--header 'Content-Type: <content-type>' \
--header 'Customer-Id: <customer-id>'import requests
url = "https://api-umbrella.io/api/services/auth"
headers = {
"Api-Key": "<api-key>",
"Customer-Id": "<customer-id>",
"Content-Type": "<content-type>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Api-Key': '<api-key>',
'Customer-Id': '<customer-id>',
'Content-Type': '<content-type>'
}
};
fetch('https://api-umbrella.io/api/services/auth', 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-umbrella.io/api/services/auth",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Api-Key: <api-key>",
"Content-Type: <content-type>",
"Customer-Id: <customer-id>"
],
]);
$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-umbrella.io/api/services/auth"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Api-Key", "<api-key>")
req.Header.Add("Customer-Id", "<customer-id>")
req.Header.Add("Content-Type", "<content-type>")
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-umbrella.io/api/services/auth")
.header("Api-Key", "<api-key>")
.header("Customer-Id", "<customer-id>")
.header("Content-Type", "<content-type>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-umbrella.io/api/services/auth")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Api-Key"] = '<api-key>'
request["Customer-Id"] = '<customer-id>'
request["Content-Type"] = '<content-type>'
response = http.request(request)
puts response.read_body{
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"expires_in": 3600,
"token_type": "Bearer"
}Authentication
Authentication Service
Authentication endpoint API documentation
POST
/
auth
Authenticate
curl --request POST \
--url https://api-umbrella.io/api/services/auth \
--header 'Api-Key: <api-key>' \
--header 'Content-Type: <content-type>' \
--header 'Customer-Id: <customer-id>'import requests
url = "https://api-umbrella.io/api/services/auth"
headers = {
"Api-Key": "<api-key>",
"Customer-Id": "<customer-id>",
"Content-Type": "<content-type>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Api-Key': '<api-key>',
'Customer-Id': '<customer-id>',
'Content-Type': '<content-type>'
}
};
fetch('https://api-umbrella.io/api/services/auth', 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-umbrella.io/api/services/auth",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Api-Key: <api-key>",
"Content-Type: <content-type>",
"Customer-Id: <customer-id>"
],
]);
$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-umbrella.io/api/services/auth"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Api-Key", "<api-key>")
req.Header.Add("Customer-Id", "<customer-id>")
req.Header.Add("Content-Type", "<content-type>")
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-umbrella.io/api/services/auth")
.header("Api-Key", "<api-key>")
.header("Customer-Id", "<customer-id>")
.header("Content-Type", "<content-type>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-umbrella.io/api/services/auth")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Api-Key"] = '<api-key>'
request["Customer-Id"] = '<customer-id>'
request["Content-Type"] = '<content-type>'
response = http.request(request)
puts response.read_body{
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"expires_in": 3600,
"token_type": "Bearer"
}For the authentication flow, required headers, and token usage details, please refer to the Authentication page.
Endpoint
POST/authHeaders
Your API key.
Your customer ID.
Available options:
application/x-www-form-urlencoded