Key introspection — the plugin's connection test
curl --request GET \
--url https://pixglory.com/api/v1/me \
--header 'Authorization: Bearer <token>'import requests
url = "https://pixglory.com/api/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://pixglory.com/api/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://pixglory.com/api/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://pixglory.com/api/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://pixglory.com/api/v1/me")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pixglory.com/api/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{
"organizationId": "<string>",
"organizationSlug": "<string>",
"organizationName": "<string>",
"keyId": "<string>",
"keyClass": "api",
"permissions": {},
"boundProject": {
"id": "<string>",
"slug": "<string>",
"name": "<string>",
"sourceType": "direct",
"fileCount": 123,
"totalSizeBytes": 123,
"publicUrl": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"quota": {
"tierSlug": "<string>",
"tierName": "<string>",
"storage": {
"usedBytes": 123,
"limitBytes": 123
}
}
}
API Reference
Key introspection — the plugin's connection test
No permission required. Any valid key of EITHER class (api or wordpress) may introspect itself — this is the endpoint the Quickstart guide points a brand-new key at.
GET
/
me
Key introspection — the plugin's connection test
curl --request GET \
--url https://pixglory.com/api/v1/me \
--header 'Authorization: Bearer <token>'import requests
url = "https://pixglory.com/api/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://pixglory.com/api/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://pixglory.com/api/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://pixglory.com/api/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://pixglory.com/api/v1/me")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pixglory.com/api/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{
"organizationId": "<string>",
"organizationSlug": "<string>",
"organizationName": "<string>",
"keyId": "<string>",
"keyClass": "api",
"permissions": {},
"boundProject": {
"id": "<string>",
"slug": "<string>",
"name": "<string>",
"sourceType": "direct",
"fileCount": 123,
"totalSizeBytes": 123,
"publicUrl": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"quota": {
"tierSlug": "<string>",
"tierName": "<string>",
"storage": {
"usedBytes": 123,
"limitBytes": 123
}
}
}
Authorizations
An API key minted from the dashboard (POST /api/api-keys), of either class: api (prefix pxg_) or wordpress (prefix pxg_wp_). Which class a given route accepts is documented per-endpoint below; presenting a real key of a class the route doesn't accept is 403 WRONG_KEY_CLASS, never folded into 401 INVALID_API_KEY. No cookie fallback exists.
Response
OK
Available options:
api, wordpress Show child attributes
Show child attributes
Show child attributes
Show child attributes
The org's POOLED storage quota (CDN + Processing combined, plan-21 §3/§4) — org-wide, identical for either key class and independent of boundProject.
Show child attributes
Show child attributes