Get current account
curl --request GET \
--url https://api.slng.ai/v1/me \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.slng.ai/v1/me"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.slng.ai/v1/me', 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.slng.ai/v1/me",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.slng.ai/v1/me"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.slng.ai/v1/me")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.slng.ai/v1/me")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"name": "Bruce Wayne",
"email": "batman@wayne.com",
"org_id": "7c3e9a14-2b6f-4d80-9e51-1a2b3c4d5e6f",
"org_name": "Wayne Corp",
"api_key_label": "batcave laptop",
"tier": "hobby"
}{
"error": "API key id not found"
}{
"error": "Internal server error"
}Account
Get current account
Return the account, organization, and API key associated with the bearer token in the request. Use this to confirm which key is in use and which organization and plan tier it belongs to.
GET
/
v1
/
me
Get current account
curl --request GET \
--url https://api.slng.ai/v1/me \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.slng.ai/v1/me"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.slng.ai/v1/me', 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.slng.ai/v1/me",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.slng.ai/v1/me"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.slng.ai/v1/me")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.slng.ai/v1/me")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"name": "Bruce Wayne",
"email": "batman@wayne.com",
"org_id": "7c3e9a14-2b6f-4d80-9e51-1a2b3c4d5e6f",
"org_name": "Wayne Corp",
"api_key_label": "batcave laptop",
"tier": "hobby"
}{
"error": "API key id not found"
}{
"error": "Internal server error"
}Authorizations
API key from the SLNG dashboard.
Response
The authenticated account.
The account associated with the authenticated API key.
Display name of the account owner.
Example:
"Bruce Wayne"
Email address of the account owner.
Example:
"batman@wayne.com"
Unique identifier of the organization the account belongs to.
Example:
"7c3e9a14-2b6f-4d80-9e51-1a2b3c4d5e6f"
Display name of the organization.
Example:
"Wayne Corp"
Label of the API key used to authenticate the request.
Example:
"batcave laptop"
Plan tier of the organization.
Example:
"hobby"
Was this page helpful?
⌘I