cURL
curl --request GET \
--url https://app.pixy.art/api/v1/me \
--header 'Authorization: Bearer <token>'import { Pixy } from '@pixy-art/sdk'
const pixy = new Pixy({
apiKey: 'YOUR_API_KEY',
})
const me = await pixy.me()
console.log(me.user)
import requests
url = "https://app.pixy.art/api/v1/me"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.pixy.art/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;
}require 'uri'
require 'net/http'
url = URI("https://app.pixy.art/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{
"user": {
"name": "Jane Doe",
"email": "jane@example.com"
}
}{
"message": "Unauthorized"
}API Reference
Get current user
Return the resolved user for the provided Pixy bearer API key.
GET
https://app.pixy.art
/
api
/
v1
/
me
cURL
curl --request GET \
--url https://app.pixy.art/api/v1/me \
--header 'Authorization: Bearer <token>'import { Pixy } from '@pixy-art/sdk'
const pixy = new Pixy({
apiKey: 'YOUR_API_KEY',
})
const me = await pixy.me()
console.log(me.user)
import requests
url = "https://app.pixy.art/api/v1/me"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.pixy.art/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;
}require 'uri'
require 'net/http'
url = URI("https://app.pixy.art/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{
"user": {
"name": "Jane Doe",
"email": "jane@example.com"
}
}{
"message": "Unauthorized"
}Was this page helpful?
⌘I