Get me
curl --request GET \
--url https://services.deepsmith.ai/core/api/external/v1/me \
--header 'Authorization: Bearer <token>'import requests
url = "https://services.deepsmith.ai/core/api/external/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://services.deepsmith.ai/core/api/external/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://services.deepsmith.ai/core/api/external/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://services.deepsmith.ai/core/api/external/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://services.deepsmith.ai/core/api/external/v1/me")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://services.deepsmith.ai/core/api/external/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{
"code": 4020,
"messages": "Key details",
"data": {
"key": {
"id": "9f2a3b4c-1d2e-4f5a-8b6c-7d8e9f0a1b2c",
"name": "Reporting script",
"prefix": "ds_live_1a2b",
"scopes": [
"visibility:read",
"contentmap:read",
"content:read",
"workspace:read"
],
"expires_at": null
},
"user": {
"id": "3b4c5d6e-7f80-4a1b-9c2d-3e4f5a6b7c8d",
"name": "Jordan Lee",
"email": "jordan@acme.com",
"avatar": null
},
"workspace": {
"id": "7c1d2e3f-4a5b-6c7d-8e9f-0a1b2c3d4e5f",
"name": "Acme"
}
}
}{
"code": 4022,
"messages": "Invalid, revoked or expired API key.",
"data": null
}Me
Get me
The API key, the user it acts as (the person who created it) and the workspace it belongs to. Works with any valid key.
GET
/
me
Get me
curl --request GET \
--url https://services.deepsmith.ai/core/api/external/v1/me \
--header 'Authorization: Bearer <token>'import requests
url = "https://services.deepsmith.ai/core/api/external/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://services.deepsmith.ai/core/api/external/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://services.deepsmith.ai/core/api/external/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://services.deepsmith.ai/core/api/external/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://services.deepsmith.ai/core/api/external/v1/me")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://services.deepsmith.ai/core/api/external/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{
"code": 4020,
"messages": "Key details",
"data": {
"key": {
"id": "9f2a3b4c-1d2e-4f5a-8b6c-7d8e9f0a1b2c",
"name": "Reporting script",
"prefix": "ds_live_1a2b",
"scopes": [
"visibility:read",
"contentmap:read",
"content:read",
"workspace:read"
],
"expires_at": null
},
"user": {
"id": "3b4c5d6e-7f80-4a1b-9c2d-3e4f5a6b7c8d",
"name": "Jordan Lee",
"email": "jordan@acme.com",
"avatar": null
},
"workspace": {
"id": "7c1d2e3f-4a5b-6c7d-8e9f-0a1b2c3d4e5f",
"name": "Acme"
}
}
}{
"code": 4022,
"messages": "Invalid, revoked or expired API key.",
"data": null
}