Get the portal context for the caller's token or session
curl --request GET \
--url https://app.hookie.ai/portal/api/me \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.hookie.ai/portal/api/me', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.hookie.ai/portal/api/me"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"portal": {
"name": "Acme Webhooks",
"branding": {
"color": "#2B56A1"
}
},
"customer_id": "cus_9182",
"event_types": [
"orders",
"invoices"
]
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>",
"reason": "<string>",
"code": "agent_scope_insufficient",
"required_scope": "hookie:read",
"granted_scopes": [
"<string>"
],
"manage_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>",
"reason": "<string>",
"code": "agent_scope_insufficient",
"required_scope": "hookie:read",
"granted_scopes": [
"<string>"
],
"manage_url": "<string>"
}Customer Portal
Get the portal context for the caller's token or session
GET
/
portal
/
api
/
me
Get the portal context for the caller's token or session
curl --request GET \
--url https://app.hookie.ai/portal/api/me \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.hookie.ai/portal/api/me', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.hookie.ai/portal/api/me"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"portal": {
"name": "Acme Webhooks",
"branding": {
"color": "#2B56A1"
}
},
"customer_id": "cus_9182",
"event_types": [
"orders",
"invoices"
]
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>",
"reason": "<string>",
"code": "agent_scope_insufficient",
"required_scope": "hookie:read",
"granted_scopes": [
"<string>"
],
"manage_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>",
"reason": "<string>",
"code": "agent_scope_insufficient",
"required_scope": "hookie:read",
"granted_scopes": [
"<string>"
],
"manage_url": "<string>"
}Authorizations
portalTokenHeaderportalSession
A hpt_… customer portal token, as Authorization: Bearer. Stored hashed and looked up by its full SHA-256 hash; shown once at issue. The query string (?token=) is not accepted: a token there ends up in request logs and traces. A browser page trades the token for a portalSession cookie with POST /portal/api/session.
Response
Portal identity and the datasets it exposes.
Show child attributes
Show child attributes
The workspace's own identifier for this end customer, taken from the token (portal_tokens.customer_id). Not settable by the customer.
Dataset names this portal exposes; [] if the stored value is unparseable. An empty array means the portal exposes nothing: no destination can be added, and none of its customers' destinations receives anything.