Qpien Api Docs
Help centerMain website
Help centerMain website
  1. Get started
  • Overview
  • Get started
    • Authentication
    • Scopes
  • Modules
    • Contacts
    • CustomerPersons
    • Conversations
    • Messages
    • Channels
    • WhatsappBusinessTemplates
    • SendMessages
  • Webhooks
    • Overview
Help centerMain website
Help centerMain website
  1. Get started

Scopes

Scopes control which operations your API key is allowed to perform.
Each scope corresponds to a permission level on a module.
read → allows fetching data (queries).
write → allows creating updating and deleting data (mutations).

Default Behavior#

When you create a new API key, you need configure read and write scopes manually in the Qpien dashboard.
After updating scopes, you must generate a new access token for the changes to take effect.

Scopes#

CustomerPersons#

OperationRequired Scope
getCustomerPersonread_customerPersons
getCustomerPersonListread_customerPersons
createCustomerPersonwrite_customerPersons
updateCustomerPersonwrite_customerPersons
deleteCustomerPersonwrite_customerPersons

Conversations#

OperationRequired Scope
getConversationread_conversations
getConversationListread_conversations
updateConversationwrite_conversations

Contacts#

OperationRequired Scope
getContactread_contacts
getContactListread_contacts
createContactwrite_contacts
updateContactwrite_contacts
deleteContactwrite_contacts

Messages#

OperationRequired Scope
getMessagesread_messages
createMessagewrite_messages

Channels#

OperationRequired Scope
getAllConnectedPlatformListread_channels

Whatsapp Business Templates#

OperationRequired Scope
getWhatsappBusinessTemplateread_whatsappBusinessTemplates
getWhatsappBusinessTemplateListread_whatsappBusinessTemplates

Example: Insufficient Scopes#

If your token does not have the required scope for an operation, you will receive an error response:
{
  "errors": [
    {
      "message": "Insufficient scopes for this operation",
      "extensions": {
        "code": "INSUFFICIENT_SCOPES",
        "requiredScope": "write_contacts"
      },
      "success": false

    }
  ]
}

Best Practices#

šŸ“Œ Follow the principle of least privilege: enable only the scopes your integration needs.
šŸ“Œ Remember to regenerate your access token after updating scopes.
šŸ“Œ Store scope information securely and avoid exposing tokens in client-side applications.
Modified atĀ 2025-11-28 08:52:04
Previous
Authentication
Next
Contacts
Built with