Create Mobile Participant Token
growsurf_create_mobile_participant_tokenCreate or fetch a participant and issue a participant-scoped mobile SDK token for a GrowSurf campaign, enabling trusted direct affiliate enrollment and bypassing public application review.
Instructions
Create or fetch a participant, then create a participant-scoped mobile SDK token via GrowSurf REST. Participant creation is trusted direct enrollment and bypasses the public application review flow for affiliates. Targets campaignId if you pass it, otherwise GROWSURF_CAMPAIGN_ID.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| Yes | |||
| language | No | The language of the participant's portal and program emails. Must be one of the program's languages (`languages` in `growsurf_get_campaign_options`); any other code returns a `400`. Applies only when this call creates the participant. Omit it or send `null` to use the program's base language. Supported codes: `en`, `es`, `fr`, `de`, `it`, `pt-BR`, `nl`, `pl`, `sv`, `tr`, `ja`, `ko`, `zh-CN`, `id`, `da`, `nb`, `nn`, `fi`, `is`, `cs`, `sk`, `hu`, `ro`, `hr`, `sl`, `et`, `lv`, `lt`, `el`, `bg`, `uk`, `ru`, `pt-PT`, `ca`, `vi`, `ms`, `fil`, `af`, `sw`. | |
| lastName | No | ||
| metadata | No | ||
| firstName | No | ||
| ipAddress | No | ||
| campaignId | Yes | Target program (campaign) id for this call. Defaults to GROWSURF_CAMPAIGN_ID when omitted. Program IDs also identify newly created programs without restarting the server. | |
| referredBy | No | ||
| fingerprint | No | ||
| isAffiliate | No | Sets whether the participant is an affiliate. Use `true` only for trusted direct enrollment. Public applicants should follow the program's configured application flow. | |
| referralStatus | No | ||
| mobileInstanceId | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| isNew | No | Whether this request created a new participant. | |
| expiresIn | No | Token lifetime in seconds. | |
| participant | No | The participant record (same shape as the `growsurf_get_participant` result). | |
| participantToken | No | Participant-scoped bearer token for GrowSurf mobile SDK participant endpoints. |