Retrieve authentication API key - SuperAI Flows
Retrieve authentication API key
cURL
curl --request GET \
--url https://flows.super.ai/api/auth/anon-key
import requests
url = "https://flows.super.ai/api/auth/anon-key"
response = requests.get(url)
print(response.text)
const options = {method: 'GET'};
fetch('https://flows.super.ai/api/auth/anon-key', 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://flows.super.ai/api/auth/anon-key",\
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://flows.super.ai/api/auth/anon-key"
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://flows.super.ai/api/auth/anon-key")
.asString();
require 'uri'
require 'net/http'
url = URI("https://flows.super.ai/api/auth/anon-key")
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
Response
Status Code
200
Content Type
application/json
Description
Authentication key successfully retrieved
Response Model
Returns the authentication key required for client applications to authenticate with the authentication API hosted at core.flows.super.ai.
anon_key
- Type: string
- Required: Yes
- Description: Anonymous authentication key for client applications. Use this key to authenticate API requests to the authentication service. Include this in your authentication API calls as the 'apikey' header. This key is safe to use in client-side applications and does not grant administrative privileges. It enables password authentication and token generation for users.
Example
{
"anon_key": "<string>"
}
Example Key:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImFiY2RlZmdoaWprbG1ub3BxcnN0Iiwicm9sZSI6ImFub24iLCJpYXQiOjE2ODkwMDAwMDAsImV4cCI6MTg0Njc2ODAwMH0.signature"