Endpoints
Always remember to handle and display any error messages to users gracefully, and use the accessToken for authenticating subsequent requests to the Chatbot API after the initial authentication.
The base url is https://api.lingoblocks.com.
Authenticate Chatbot User
Authenticate and obtain an access token to communicate with the chatbot.
Endpoint:
/v1/chatbot/:id/authenticateMethod: POST
Request Body:
accessToken: The existing access token for the session (optional).
Params:
id: Your chatbot's unique ID.
Response:
accessToken: The generated or verified access token for the session.Note: If an existing
accessTokenis not provided or is invalid, a newaccessTokenwill be generated.
Send a Message to Chatbot
Send a message to the chatbot and receive its response.
Endpoint:
/v1/chatbot/:id/messageMethod: POST
Headers:
Content-Type: application/json
Params:
id: Your chatbot's unique ID.
Request Body:
text: The message you want to send to the chatbot.accessToken: The access token obtained after authentication.
Response:
response: The chatbot's reply.metadata: Additional data about the chatbot's response.
Get Chatbot Widget Settings
Retrieve the settings for displaying the chatbot widget.
Endpoint:
/v1/chatbot/widget/:id/settingsMethod: GET
Headers:
Content-Type: application/json
Params:
id: Your chatbot's unique ID.
Query Parameters:
accessToken: The access token obtained after authentication.
Response:
settings: Object containing settings likenameandprofilePhotofor the chatbot widget.
Last updated