growsurf_create_mobile_participant_token
Create or fetch a GrowSurf participant and generate a participant-scoped mobile SDK token for campaign enrollment, targeting the specified campaign or the default GROWSURF_CAMPAIGN_ID.
Instructions
Create or fetch a participant, then create a participant-scoped mobile SDK token via GrowSurf REST. Participant creation is trusted direct enrollment; do not use it for a public application when the program requires affiliate review. Targets campaignId if you pass it, otherwise GROWSURF_CAMPAIGN_ID.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| Yes | |||
| lastName | No | ||
| metadata | No | ||
| firstName | No | ||
| ipAddress | No | ||
| campaignId | No | Target program (campaign) id for this call. Defaults to GROWSURF_CAMPAIGN_ID when omitted. Pass the `id` returned by growsurf_create_campaign to configure or operate a program you just created, 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. |