Verify Email
curl --request POST \
--url https://auth.contra.id/v1/programmatic/verify-emailimport requests
url = "https://auth.contra.id/v1/programmatic/verify-email"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://auth.contra.id/v1/programmatic/verify-email', 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://auth.contra.id/v1/programmatic/verify-email",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$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://auth.contra.id/v1/programmatic/verify-email"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://auth.contra.id/v1/programmatic/verify-email")
.asString();require 'uri'
require 'net/http'
url = URI("https://auth.contra.id/v1/programmatic/verify-email")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyAuth API (Programmatic)
Verify Email
Submit the OTP from your inbox. Returns access_token, refresh_token, and your first application’s api_key.
POST
/
v1
/
programmatic
/
verify-email
Verify Email
curl --request POST \
--url https://auth.contra.id/v1/programmatic/verify-emailimport requests
url = "https://auth.contra.id/v1/programmatic/verify-email"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://auth.contra.id/v1/programmatic/verify-email', 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://auth.contra.id/v1/programmatic/verify-email",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$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://auth.contra.id/v1/programmatic/verify-email"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://auth.contra.id/v1/programmatic/verify-email")
.asString();require 'uri'
require 'net/http'
url = URI("https://auth.contra.id/v1/programmatic/verify-email")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyThe moment you receive your first
api_key.
Request
curl -X POST https://auth.contra.id/v1/programmatic/verify-email \
-H "Content-Type: application/json" \
-d '{
"email": "you@yourco.com",
"code": "A3K9F2"
}'
Response · 200
{
"access_token": "eyJ…",
"refresh_token": "eyJ…",
"expires_in": 86400,
"organization": { "uuid": "…", "name": "Your Co" },
"application": {
"uuid": "app_…",
"client_id":"cli_…",
"api_key": "ctr_42LvSyZn5ioLSyBknquXYK"
}
}
application.api_key becomes your x-api-key for all /v1/* calls.
Next
export CONTRA_KEY="ctr_42LvSyZn…"
curl https://identity.contra.id/v1/workflows -H "x-api-key: $CONTRA_KEY"
⌘I