Link app using SS app link token

Link an app using an SS-issued app link token (Flow B). No PENDING request is created.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Verifies an SS-issued app link JWT with Self Serve, then links the app immediately .

API Request:

curl --location --request POST 'https://partner.gupshup.io/partner/{{PARTNER_ID}}/app-link/app-token' \
--header 'token: {{PARTNER_TOKEN}}' \
--header 'Content-Type: application/json' \
--data '{"token": "eyJhbGciOiJSUzI1NiJ9..."}'

Response:

Status CodeResponseComments
200{ "status": "success", "linked": true, "appId": "app_xyz123", "appName": "My App", "customerId": "cust_1", "partnerId": 8814, "tokenStatus": "ACTIVE" }Success. App linked in this call.
400{ "status": "error", "message": "token is required" }Request body null or token blank (controller validation).
400{ "status": "error", "message": "Invalid token format" }JWT cannot be decoded.
400{ "status": "error", "message": "Invalid token: appId claim is missing" }JWT decode succeeded but no appId, app_id, or usable sub claim.
400{ "status": "error", "message": "SS app link token is not valid (status={status}, tokenStatus={tokenStatus})" }SS verify response not status=success + tokenStatus=ACTIVE.
400{ "status": "error", "message": "App details not found for appId: {appId}" }SS app details lookup failed after verify.
400{ "status": "error", "message": "App is already linked to Partner" }Cross-partner guard — app mapped to another partner in partner_apps.
400{ "status": "error", "message": "This app has been previously mapped to a different partner ID, kindly use the correct Partner ID" }Prior APP_LINK history indicates a different partner.
400{ "status": "error", "message": "The partner you are trying to add may not be an approved partner by Gupshup" }Partner not approved.
400{ "status": "error", "message": "Re-linking of application is not allowed. App was created by partner." }App already linked elsewhere and partner-created.
400{ "status": "error", "message": "Re-linking of application to same partner is not allowed." }App already linked to this partner.
401{ "status": "error", "message": "Unauthorised access to the resource. Please review request parameters and headers and retry" }Missing/invalid authentication.
403{ "status": "error", "message": "Forbidden Access" }Path partnerId mismatch or not PARTNER_ADMIN.

Request parameters:


KeyDescriptionValuesData TypeRequired / OptionalConstraints
tokenPartner token credential{{PARTNER_TOKEN}}StringRequiredSee §1.
partnerIdPartner ID (path)e.g. 8814IntegerRequiredMust match authenticated partner context.
tokenSS app link JWTJWT stringStringRequiredTrimmed before verify. SS is the authorization decision.


Path Params
int32
required
Body Params

Request to link an app using an SS-issued app link token

string
required

SS-issued app link JWT

Responses

Language
Credentials
Bearer
JWT
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json