Clients
Endpoints:
Client name can contain any Unicode characters. Be sure to escape it if necessary.
If a client is deleted, any API objects that embed the client will return a dummy client instead, with an ID of 0
and the name [REMOVED]
.
GET /users/{user_id}/clients
Scope:
Retrieve a list of active clients created by a user.
URL Parameters
Name | Description |
---|---|
user_id |
ID of the user to list clients from |
Example Call
curl "https://api.pnut.io/v1/users/8/clients" \
-H "Authorization: Bearer ${ACCESS_TOKEN}" \
-H "X-Pretty-Json: 1"
Returns a list of clients
{
"meta": {
"code": 200
},
"data": [
{
"id": "String",
"name": "String",
"url": "https://example.com"
}
]
}
GET /clients/{client_id}
Scope:
Retrieve details on a public client, by client ID.
URL Parameters
Name | Description |
---|---|
client_id |
ID of the client to retrieve |
Example
curl "https://api.pnut.io/v1/clients/3PFPMSet53RutGINA8e5HWqYg_UCDHad" \
-H "Authorization: Bearer ${ACCESS_TOKEN}" \
-H "X-Pretty-Json: 1"
Returns the detailed client object
{
"meta": {
"code": 200
},
"data": {
"created_at": "ISO-8601",
"user": {"...User Object..."},
"id": "String",
"url": "https://example.com",
"logo_image": "https://example.com/logo.png",
"name": "String",
"posts": 0,
"content": {
"text": "String",
"html": "<span itemscope=\"https://pnut.io/schemas/Post\">String</span>",
"entities": {
"links": [],
"mentions": [],
"tags": []
}
}
}
}