Permissions
Permissions offer fine-grained control over your Application's access to different resources within your Tenant. We suggest minimizing the scope of your Applications, and to not share Applications across your internal services.
Permissions are associated with every Application and can be configured when you create an Application or update an Application.
Every API endpoint will document the required permissions needed to perform the operation against the endpoint.
List Permissions
Gets the list of all supported permissions.
GET
https://api.basistheory.com/permissionsRequest
- cURL
- Node
- JavaScript (legacy)
- C#
- Java
- Python
- Go
curl "https://api.basistheory.com/permissions" \
-H "BT-API-KEY: <API_KEY>"
await client.permissions.list();
import { BasisTheory } from "@basis-theory/basis-theory-js";
const bt = await new BasisTheory().init("<API_KEY>");
const permissions = await bt.permissions.list();
await client.Permissions.ListAsync(new PermissionsListRequest());
new PermissionsClient(ClientOptions.builder().build()).list();
client.permissions.list()
applicationType := "private"
permissions, err := client.Permissions.List(ctx, &basistheory.PermissionsListRequest{
ApplicationType: &applicationType,
})
Query Parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
application_type | false | string | null | Application type to filter permissions by |
Response
Returns an array of permission objects. Returns an error if permissions could not be retrieved.
[
{
"type": "token:read",
"description": "Read tokens",
"application_types": [
"private"
]
},
{...},
{...}
]
Permission Object
| Attribute | Type | Description |
|---|---|---|
type | string | Permission type referenced by Basis Theory API endpoints |
description | string | Description of the permission |
application_types | array | List of application types that can assign the permission |