Get the caller
curl --request GET \
--url https://api.paygentic.io/v0/me \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.paygentic.io/v0/me"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.paygentic.io/v0/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.paygentic.io/v0/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://api.paygentic.io/v0/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://api.paygentic.io/v0/me")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paygentic.io/v0/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{
"userId": "<string>",
"organizationId": "<string>",
"organizationType": "merchant",
"roles": [
"<string>"
],
"permissions": [
"organization:read"
],
"credential": {
"type": "session",
"clientId": "<string>",
"apiKeyId": "<string>"
}
}{
"message": "The requested resource was not found",
"error": "not_found"
}{
"message": "The requested resource was not found",
"error": "not_found"
}Me
Get the caller
Returns the caller’s identity in its active organization, its roles, and the permissions that its credential holds there. The permissions are the effective set for the credential of the call: for a session or an API key, those of the principal; for an OAuth token, those of the principal narrowed to the scopes of the token.
GET
/
v0
/
me
Get the caller
curl --request GET \
--url https://api.paygentic.io/v0/me \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.paygentic.io/v0/me"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.paygentic.io/v0/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.paygentic.io/v0/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://api.paygentic.io/v0/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://api.paygentic.io/v0/me")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paygentic.io/v0/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{
"userId": "<string>",
"organizationId": "<string>",
"organizationType": "merchant",
"roles": [
"<string>"
],
"permissions": [
"organization:read"
],
"credential": {
"type": "session",
"clientId": "<string>",
"apiKeyId": "<string>"
}
}{
"message": "The requested resource was not found",
"error": "not_found"
}{
"message": "The requested resource was not found",
"error": "not_found"
}Response
The caller
The permissions that the credential of the call holds in the active organization.
A permission of the catalog: a resource read or write, or a sensitive action.
Available options:
organization:read, members:read, profile:read, apiKeys:read, merchants:read, consumers:read, customers:read, plans:read, prices:read, products:read, features:read, fees:read, billableMetrics:read, items:read, pricingUnits:read, subscriptions:read, subscriptionAdjustments:read, subscriptionProposals:read, discounts:read, grants:read, entitlements:read, creditPools:read, orders:read, billingSchedules:read, invoices:read, payments:read, paymentSessions:read, portalSessions:read, platformUsers:read, platformAdmin:read, loginLockout:read, platformSystem:read, organizationCreation:read, compliance:read, taxSettings:read, costs:read, paymentAccounts:read, payouts:read, externalAccounts:read, externalReferences:read, merchantIntegrations:read, webhooks:read, testClocks:read, approvals:read, sources:read, revenue:read, organization:write, members:write, profile:write, apiKeys:write, merchants:write, consumers:write, customers:write, plans:write, prices:write, products:write, features:write, fees:write, billableMetrics:write, items:write, pricingUnits:write, subscriptions:write, subscriptionAdjustments:write, subscriptionProposals:write, discounts:write, grants:write, entitlements:write, creditPools:write, orders:write, billingSchedules:write, invoices:write, payments:write, paymentSessions:write, portalSessions:write, platformUsers:write, platformAdmin:write, loginLockout:write, platformSystem:write, organizationCreation:write, compliance:write, taxSettings:write, costs:write, paymentAccounts:write, payouts:write, externalAccounts:write, externalReferences:write, merchantIntegrations:write, webhooks:write, testClocks:write, approvals:write, sources:write, events:write, invoices:issue, invoices:void, invoices:transition, payments:refund, organization:delete, ownership:transfer, subscriptions:terminate, subscriptions:terminateWithReason, subscriptions:reconcile, subscriptions:update, subscriptions:delete, subscriptions:taxExempt, subscriptions:autoApprove, organization:resetData, subscriptionProposals:approve Was this page helpful?