CTRLK

Shared components

Embeddable Answers

|

View as Markdown

EARLY ACCESS

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 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 applicationId and entityId pairs as a part of using Answers with X.

Compatibility with X [#compatibility-with-x-answers]

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 [#generate-request-uri-answers]

Noteapplication_id and entity_id are optional request parameters.

Follow these actions on your backend before rendering the frontend with Answers:

  1. 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:

    json
    1'Content-Type': 'application/json',
    2'Authorization': 'App <api-key>'

    Use the following payload:

    json
    1{
    2"scopes": ['answers:manage', 'voice-message:manage'],
    3"application_id": "<application_id>",
    4"entity_id": "<entity_id>",
    5"embedding_id": "81d4b814-31ba-46aa-b842-8b07ee1221f6"
    6}

    The cURL request would be as follows:

    json
    1curl --location 'https://api.infobip.com/embeddable/1/auth/par' \
    2--header 'Authorization: App <api-key>' \
    3--header 'Content-Type: application/json' \
    4--data '{
    5"scopes": [
    6 "answers:manage",
    7 "voice-message:manage"
    8],
    9"application_id": "<application_id>",
    10"entity_id": "<entity_id>",
    11"embedding_id": "81d4b814-31ba-46aa-b842-8b07ee1221f6"
    12}'
  2. The response contains the object with request_uri parameter. Use this parameter in the iFrame component.

Add the iFrame component to your web page [#add-iframe-component-answers]

Include the following iFrame component on your web page:

json
<iframe src="https://embeddings.infobip.com/authorize?request_uri={request_uri}"></iframe>

Example

Refer to the Oracle Responsys integration.