get https://partner.gupshup.io/partner/app//flows//preview
Use this API to get a preview URL of the flow.
Request Parameters
Key | Description | Value | Data type | Required/Optional | Constraints |
---|---|---|---|---|---|
Authorization | Access Token for the application | {{PARTNER_APP_TOKEN}} | String | Required | Should be a valid Partner App Access Token |
appId | App id of the app | {{APP_ID}} | String | Required | The Id should be a valid app Id of Gupshup |
flowId | Flow Id | {{FLOW_ID}} | String | Required | Flow 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 |