Embeddable Answers
Embeddable Answers enables you to deploy the full scope of Answers while simplifying the experience for your platform users. You can integrate the solution into your web application through an iFrame.
Full experience of Answers
This option has the complete chatbot builder.
Prerequisites
-
Infobip account with Account management role.
-
Generate API key (opens in a new tab) with the following API scopes.
- account-management:manage - to be able to initiate OAuth PAR flow.
- answers:manage - to be able to manage Answers.
- voice-message:manage - to be able to manage voicebots.
-
Create (opens in a new tab) applicationId and entityId pairs as a part of using Answers with X.
Compatibility with X
You can use Embeddable Answers with or without X.
Process overview
To work with the Answers iFrame component, you need to provide a request URI. This URI is used to access the Answers API. This URI is generated and injected by the backend as part of a more secure authentication flow called OAuth Pushed Authorization Requests (PAR).
You then need to add the Answers iFrame component to your webpage.
Generate request URI
Follow these actions on your backend before rendering the frontend with Answers:
-
To initiate OAuth PAR flow, send a POST request to the following URL:
POST https://api.infobip.com/embeddable/1/auth/par
Use the following headers:
'Content-Type': 'application/json', 'Authorization': 'App <api-key>'
Use the following payload:
{ "scopes": ['answers:manage', 'voice-message:manage'], "application_id": "<application_id>", "entity_id": "<entity_id>" }
The cURL request would be as follows:
curl --location 'https://api.infobip.com/embeddable/1/auth/par' \ --header 'Authorization: App <api-key>' \ --header 'Content-Type: application/json' \ --data '{ "scopes": [ "answers:manage", "voice-message:manage" ], "application_id": "<application_id>", "entity_id": "<entity_id>" }'
-
The response contains the object with
request_uri
parameter. Use this parameter in the iFrame component.
Add the iFrame component to your web page
Include the following iFrame component on your web page:
<iframe src="https://api.infobip.com/embeddable/1/auth/authorize?request_uri={request_uri}"></iframe>
Example
Refer to the Oracle Responsys integration.