Add NSPhotoLibraryUsageDescription and NSCameraUsageDescription keys to your Info.plist.
Import
import { ChatWidget } from 'alo-chat-react-native';
// or
import ChatWidget from 'alo-chat-react-native/ChatWidget';
Props
Name
Type
Required
Default
Description
appId
string
yes
The ĀLO provided App ID.
authToken
string
yes
The ĀLO generated auth token providing secure access to the ĀLO chat servers.
sendIcon
node
yes
The icon to be used for the send button.
uploadIcon
node
yes
The icon to be used for the upload button.
userId
string
yes
A unique ID that identifies the user who is chatting.
languageSettingsIcon
node
no
en
The icon to be used for the language settings button
Auth Token Instructions
POST https://auth.alo.ai/v1/auth
Headers:
- Authorization: Bearer <ApiKey>
Payload:
- ttl
- user
Payload
Key
Type
Required
Default
Description
user
object
yes
A collection of custom private claims used to share information with ALO
ttl
number
no
1440
Time in minutes for which granted access is valid. Min is 1, Max is 525600.
User Schema
Key
Type
Required
Description
id
string
yes
Unique ID for the user to grant access to
firstName
string
no
First/given name
lastName
string
no
Last/family name
email
string
no
Email address
phoneNumber
string
no
Must start with a plus (+) sign, followed immediately by the country code. A phone number can only contain the + sign and digits. You must remove any other characters from a phone number, such as parentheses, spaces, or dashes (-) before submitting the value to the service. For example, a United States-based phone number must follow this format: +14325551212.