List your personal access tokens
curl --request GET \
--url https://api-staging.pixwel.com/api/personal-access-tokens \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api-staging.pixwel.com/api/personal-access-tokens"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api-staging.pixwel.com/api/personal-access-tokens', 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-staging.pixwel.com/api/personal-access-tokens",
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: Basic <encoded-value>"
],
]);
$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-staging.pixwel.com/api/personal-access-tokens"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
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-staging.pixwel.com/api/personal-access-tokens")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-staging.pixwel.com/api/personal-access-tokens")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body[
{
"_id": "<string>",
"name": "<string>",
"tokenPrefix": "<string>",
"createdAt": 123,
"lastUsedAt": 123,
"expiresAt": 123,
"revokedAt": 123
}
]PersonalAccessTokens
List your personal access tokens
Returns the authenticated user’s tokens that have not been revoked, newest first. The token values themselves are never returned.
GET
/
personal-access-tokens
List your personal access tokens
curl --request GET \
--url https://api-staging.pixwel.com/api/personal-access-tokens \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api-staging.pixwel.com/api/personal-access-tokens"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api-staging.pixwel.com/api/personal-access-tokens', 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-staging.pixwel.com/api/personal-access-tokens",
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: Basic <encoded-value>"
],
]);
$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-staging.pixwel.com/api/personal-access-tokens"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
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-staging.pixwel.com/api/personal-access-tokens")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-staging.pixwel.com/api/personal-access-tokens")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body[
{
"_id": "<string>",
"name": "<string>",
"tokenPrefix": "<string>",
"createdAt": 123,
"lastUsedAt": 123,
"expiresAt": 123,
"revokedAt": 123
}
]Authorizations
BasicAuthBearerAuth
Email address and password. A personal access token (pat_…) or session token (token-…) may also be sent in the password field, with any non-empty value as the username — a blank username short-circuits to a 401 before the token is read.
Response
OK
User-supplied label, e.g. ci-deploy
First 8 hex characters after pat_, for telling tokens apart
Unix timestamp
Unix timestamp of the last request made with this token (throttled to one write per minute)
Unix timestamp after which the token stops working
Unix timestamp at which the token was revoked