Get preview URL

Use this API to get a preview URL of the flow.

Request Parameters

KeyDescriptionValueData typeRequired/OptionalConstraints
AuthorizationAccess Token for the application{{PARTNER_APP_TOKEN}}StringRequiredShould be a valid Partner App Access Token
appIdApp id of the app{{APP_ID}}StringRequiredThe Id should be a valid app Id of Gupshup
flowIdFlow Id{{FLOW_ID}}StringRequiredFlow Id generated by Meta

Sample Request

curl --location --request GET 'https://partner.gupshup.io/partner/app/{{APP_ID}}/flows/{{FLOW_ID}}/preview' \
--header 'Authorization: {{PARTNER_APP_TOKEN}}' \
--header 'Content-Type: application/json'

Sample Response

{
    "id": "1616289422261049",
    "preview": {
        "expires_at": "2024-07-21T10:15:47+0000",
        "preview_url": "https://business.facebook.com/wa/manage/flows/1616289422261049/preview/?token=fe2fa8b0-86bf-4d53-a6c3-eec4085ab48b"
    },
    "status": "success"
}

Status Codes

Status Code

Response

Comments

Success

200

{

"id": "1616289422261049","preview":{ "expires_at": "2024-07-21T10:15:47+0000", "preview_url": "https://business.facebook.com/wa/manage/flows/1616289422261049/preview/?token=fe2fa8b0-86bf-4d53-a6c3-eec4085ab48b" }, "status": "success" }

preview_url has the link to preview flow created

Error

400

{

"status": "error","message": "Unsupported get request. Object with ID '68235e827354875234875' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api" }

For invalid flow ID

Language
Click Try It! to start a request and see the response here!