Skip to content

Commit edf53e3

Browse files
chore: Update Platform API FAQs
- Add more details about platform apps
1 parent dea77fa commit edf53e3

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

api-reference/introduction.mdx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,23 @@ Client APIs are intended for building custom messaging experiences over Chatwoot
4141

4242
Platform APIs are used to manage Chatwoot installations at the admin level. These APIs allow you to control users, roles, and accounts, or sync data from external authentication systems.
4343

44+
> **Note:** Platform APIs cannot access accounts or users created via the Chatwoot UI, or by other API keys. They can only access accounts, users, and other objects created by the specific platform API key used for authentication, or objects explicitly permitted to that API key.
45+
4446
- **Authentication**: Requires an `access_token` generated by a **Platform App**, which can be created in the **Super Admin Console**.
4547
- **Availability**: Available on **Self-hosted** / **Managed Hosting** Chatwoot installations only.
4648

4749
---
4850

4951
Use the right API for your use case, and you'll be able to extend, customize, and integrate Chatwoot into your stack with ease.
52+
53+
---
54+
55+
## FAQ
56+
57+
### Why do I get a 401 'Non permissible resource' error when using Platform API tokens?
58+
59+
Platform APIs cannot access accounts or users created via the Chatwoot UI, or by other API keys. They can only access accounts, users, and other objects created by the same API key, or objects explicitly permitted to that API key. If you need to grant a Platform App access to an object (such as an Account) that it did not create, you can manually add the permission using the following command in a Rails console (replace the numbers with the correct IDs):
60+
61+
```ruby
62+
PlatformAppPermissible.create!(platform_app: PlatformApp.find(1), permissible: Account.find(1))
63+
```

contributing-guide/chatwoot-apis.mdx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,20 @@ Ref: [Postman Collection](https://www.postman.com/chatwoot/workspace/chatwoot-ap
4141

4242
The installation admin can use these APIs to manage users, accounts, and roles. These APIs could also be used to sync auth information from external systems into chatwoot. These APIs are particularly helpful if you plan to build a conversation management interface into your existing software stack.
4343

44+
> **Note:** Platform APIs cannot access accounts or users created via the Chatwoot UI, or by other API keys. They can only access accounts, users, and other objects created by the specific platform API key used for authentication, or objects explicitly permitted to that API key.
45+
4446
To authenticate these APIs, you must have an `access_token` issued on behalf of a `Platform app`. You can create a Platform App from [Super Admin Console](/self-hosted/monitoring/super-admin-sidekiq/). The access_token can also be obtained from the `Access Tokens` tab in [Super Admin Console](/self-hosted/monitoring/super-admin-sidekiq/).
4547

4648
These APIs are available on `self-hosted` Chatwoot installations.
4749

4850
Ref: [Postman Collection](https://www.postman.com/chatwoot/workspace/chatwoot-apis/collection/162770-e5451b69-9f97-489b-b352-4ca7d8d82aff)
51+
52+
### FAQ
53+
54+
#### Why do I get a 401 'Non permissible resource' error when using Platform API tokens?
55+
56+
Platform APIs cannot access accounts or users created via the Chatwoot UI, or by other API keys. They can only access accounts, users, and other objects created by the same API key, or objects explicitly permitted to that API key. If you need to grant a Platform App access to an object (such as an Account) that it did not create, you can manually add the permission using the following command in a Rails console (replace the numbers with the correct IDs):
57+
58+
```ruby
59+
PlatformAppPermissible.create!(platform_app: PlatformApp.find(1), permissible: Account.find(1))
60+
```

0 commit comments

Comments
 (0)