Get account profile
curl --request GET \
--url https://api.generect.com/api/v1/accounts/me/ \
--header 'Authorization: <api-key>'import requests
url = "https://api.generect.com/api/v1/accounts/me/"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.generect.com/api/v1/accounts/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.generect.com/api/v1/accounts/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: <api-key>"
],
]);
$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.generect.com/api/v1/accounts/me/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
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.generect.com/api/v1/accounts/me/")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.generect.com/api/v1/accounts/me/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "a1b2c3d4-e5f6-4789-a0b1-c2d3e4f5a6b7",
"email": "jordan.ellis@microsoft.com",
"name": "Jordan Ellis",
"plan": "Pro",
"credits": {
"balance": 5000,
"used_this_month": 1234,
"monthly_limit": 10000
},
"preview_tier": true
}
}{
"status": "error",
"status_code": 401,
"detail": "Authentication credentials were not provided."
}{
"status": "error",
"status_code": 403,
"detail": "You do not have permission to perform this action."
}Account
Get account profile
Retrieve the current account profile, credit balance, monthly usage, and Preview tier eligibility.
GET
/
api
/
v1
/
accounts
/
me
/
Get account profile
curl --request GET \
--url https://api.generect.com/api/v1/accounts/me/ \
--header 'Authorization: <api-key>'import requests
url = "https://api.generect.com/api/v1/accounts/me/"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.generect.com/api/v1/accounts/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.generect.com/api/v1/accounts/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: <api-key>"
],
]);
$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.generect.com/api/v1/accounts/me/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
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.generect.com/api/v1/accounts/me/")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.generect.com/api/v1/accounts/me/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "a1b2c3d4-e5f6-4789-a0b1-c2d3e4f5a6b7",
"email": "jordan.ellis@microsoft.com",
"name": "Jordan Ellis",
"plan": "Pro",
"credits": {
"balance": 5000,
"used_this_month": 1234,
"monthly_limit": 10000
},
"preview_tier": true
}
}{
"status": "error",
"status_code": 401,
"detail": "Authentication credentials were not provided."
}{
"status": "error",
"status_code": 403,
"detail": "You do not have permission to perform this action."
}Was this page helpful?
⌘I