Initialization
Before you can interact with Raven's API, you need to generate your token. This step authenticates your requests and ensures they’re securely tied to your account.
Generate API Token
Here steps to create new token:
On your Raven App, Go to Setting menu
Scroll to API Section with title "The Raven API is used to link with your backend."
Write your token name
submit with "Generate New Token" button
copy token and save it (because it's will invisible after)
confirm by clicking "I already keep it" button
check your new generated token on the list
click gear icon to continue setup your new token configuration
update the value as your need, then submit by clicking "Send" button
Token Configuration
Here are brief definitions and functions of the configuration terms used in this section:
| Label Name | Editable | Ability Key | Description |
|---|---|---|---|
| Name | No | The designated name assigned to the token. | |
| Expiration | No | The expiration date after which the token is no longer valid. Expired tokens are not removed automatically. | |
| Topic Anchor | Yes | The topic selected as the anchor for delivering the new message. The topic must be of type "mass". | |
| User Aliases | Yes | The user selected to be recorded. The associated topic must be of type "mass". | |
| Add Persona | Yes | persona_add | Creates a new persona, including its attributes and associated contact information. |
| Update Persona Header | Yes | persona_update | Updates the name of an existing persona. |
| Update Persona Attribute | Yes | attribute_update | Modifies the attribute value of a persona. Allows clearing the value by setting it to empty. |
| Add New Persona Contact | Yes | contact_add | Adds a new contact to an existing persona. |
| Create New Message (Persona as Sender) | Yes | message_add | Sends a new message to the topic anchor on behalf of a persona. |
| Send New Message (Bot as Sender) | Yes | message_send | Sends a new message as a user and automatically delivers it to the relevant messaging platform. If no topic is specified, the Topic Anchor will be used by default. If no user is specified, the User Aliases will be used by default. |
| Create New Topic | Yes | topic_add | Creates a new topic. When used in conjunction with message_send, the message will automatically be routed to this topic. |
Security Tip
Never expose your API Token key in frontend code or client-facing apps. For those, generate and use temporary tokens via your backend.