What type of API does tawk.to provide?
-
tawk.to provides a REST API
-
The REST API allows developers to automate tasks on behalf of agents
-
It enables retrieving, creating, updating, and deleting resources
-
The API consists of HTTP RPC-style methods, with endpoints in the form https://api.tawk.to/v1/METHOD
-
The tawk.to REST API allows developers to:
- Automatically create properties for customers
- Invite customers to properties
- Read conversation history
- Manage webhooks
- Create new chat widgets
- Manage Knowledge Base articles
- Retrieve chat statistics
- Filter and retrieve lists of tickets, chats, property members, etc.
-
Access to the REST API requires requesting beta access
-
Once approved, developers receive documentation, username and password
Does the tawk.to API have webhooks?
Webhook Support
Yes, the official tawk.to API does support webhooks.
Supported Events
You can configure webhooks for the following events:
- Chat starts
- Chat ends
- New chat transcripts
- New ticket is created
Webhook Configuration
Webhooks can be configured in the tawk.to dashboard under the Admin section. When setting up a webhook, you need to specify:
- A URL to receive the webhook POST requests
- One or more events to subscribe to
- A secret key for verifying the webhook payload
Webhook Payload
When a webhook is triggered, a POST request is sent to the configured URL with a JSON payload specific to the event type.
Verification
The webhook includes a signature that can be used to verify the payload was sent by tawk.to. Code examples are provided for verifying the signature in Node.js, PHP, and Ruby.
Managing Webhooks
Webhooks can be created, edited and deleted through the tawk.to dashboard in the Administration panel under Settings > Webhooks.
In summary, tawk.to offers robust webhook support for key chat and ticket events, allowing real-time integration with external systems. The webhooks can be easily configured and managed through the dashboard.
Rate Limits and other limitations
Based on the search results provided, there is no specific information about the API rate limits for the tawk.to API. However, I can provide some general information about tawk.to's API offerings and authentication:
REST API
- tawk.to offers a REST API that is currently in private beta [1].
- To use the REST API, you need to request access through their beta access request form [1].
- The REST API allows you to perform actions on behalf of an agent, such as creating properties, inviting customers, reading conversation history, managing webhooks, and more [1][3].
Authentication
- The REST API uses either API key authentication via HTTP Basic Authentication or OAuth2 [1].
- For OAuth2, tawk.to supports authorization code flow and implicit grant flow [1].
Key Points
- The API documentation is provided after your request for access is approved [1].
- All API requests must be made over HTTPS [1].
- The API responses are in JSON format [1].
Best Practices
- Keep your client secret confidential when using OAuth2 authorization code flow [1].
- Use the onLoad event to ensure the widget and API are fully loaded before sending commands [3].
While the search results do not provide specific information about rate limits, it's common for APIs to implement rate limiting to prevent abuse. If you need detailed information about rate limits for the tawk.to API, I recommend:
- Requesting access to the REST API beta.
- Reviewing the documentation provided after approval.
- Contacting tawk.to support directly for specific rate limit information.
Remember that API rate limits can change over time, so it's always best to refer to the most up-to-date official documentation or contact the API provider directly for the most accurate information.
Latest API Version
Based on the search results provided, here are the key points regarding the most recent version of the tawk.to API:
Current API Version
The search results do not explicitly mention a specific version number for the tawk.to API. However, they do provide information about recent updates and features, which suggests the API is actively maintained and updated.
Key Points
-
JavaScript API:
- The tawk.to JavaScript API provides a flexible set of methods for manipulating the chat widget on websites.
- Recent updates include new functions like
Tawk_API.switchWidget()
, Tawk_API.start()
, and Tawk_API.shutdown()
.
-
REST API:
- tawk.to offers a REST API that allows automation of tasks on behalf of agents.
- Access to the REST API requires requesting beta access.
-
Recent Updates:
- The most recent updates mentioned in the search results are from July 2024.
- These updates include bug fixes, improvements to chat message handling, and new API functions.
-
Breaking Changes:
- The JavaScript API functions
Tawk_API.onChatMessageVisitor
, Tawk_API.onChatMessageAgent
, and Tawk_API.onChatMessageSystem
now return an object instead of a string, providing mixed content of attachments and messages.
-
API Documentation:
- The JavaScript API documentation is available on the tawk.to Developer Platform.
- REST API documentation is provided to users after their beta access request is approved.
Best Practices
- Always check the official tawk.to Developer Platform for the most up-to-date documentation and version information.
- When using the REST API, ensure you have requested and been granted access.
- Be aware of breaking changes, such as the new object return format for chat message functions.
- Utilize the new API functions like
switchWidget()
, start()
, and shutdown()
for more control over the widget behavior.
In conclusion, while there isn't a specific version number mentioned, the tawk.to API appears to be regularly updated with new features and improvements. The most recent updates mentioned are from July 2024, but it's always best to check the official documentation for the latest information.
How to get a tawk.to developer account and API Keys?
To get a developer account for tawk.to and create an API integration, you need to follow these steps:
-
Request beta access to the REST API
- Visit this link to request access: [https://www.tawk.to/rest-api-beta-access-request/]
-
Wait for approval
- The tawk.to team typically reviews and approves requests within 24-48 hours
-
Receive credentials
- Once approved, you will receive an email with a link to the API documentation and credentials (username and password)
-
Generate an API key
- After approval, you can generate an API access key from your tawk.to profile:
- Go to your tawk.to dashboard
- Click on your profile picture
- Select "API Keys"
- Click "Generate new API key"
-
Start using the API
- Use the provided documentation to make API calls using your API key for authentication
What can you do with the tawk.to API?
Based on the search results provided, here are the key data models you can interact with using the tawk.to API, along with what is possible for each:
Properties
- Retrieve a list of properties
- Create new properties automatically for customers
- Invite customers to properties
- Create or delete chat widgets for properties
- Add, remove, or update widget cards
- Filter chat statistics for a property by agent, tag, department, date, etc.
Conversations
- Read conversation history
- Retrieve a filtered list of chats
- Get specific chat statistics
Tickets
- Retrieve a filtered list of tickets
Knowledge Base
- Manage Knowledge Base content
- Create new Knowledge Base articles
- List Knowledge Base articles and categories for a property
Webhooks
Tabs
- Automatically create new tabs
Property Members
- Retrieve a filtered list of property members
Chat Widget
- Create, delete, or update chat widgets for properties
Key points:
- The API allows retrieving, creating, updating, and deleting various resources
- Authentication is required using API keys
- Requests are made to endpoints in the format https://api.tawk.to/v1/METHOD
- The API enables automating tasks and integrating tawk.to data with other systems
- Detailed OpenAPI specifications are needed to integrate with Apollo AI for enhanced chatbot capabilities
Best practices:
- Test integrations thoroughly for accuracy, latency, and security
- Follow best practices for API authentication and data encryption
- Optimize integrations for smooth customer experiences
- Ensure integrations can scale to handle increasing chat volumes
The tawk.to API provides comprehensive access to manage most aspects of the live chat platform programmatically, enabling automation and integration with other business systems.