Create Mobile Participant Token
growsurf_create_mobile_participant_tokenCreate or fetch a participant, then issue a participant-scoped mobile SDK token for GrowSurf programs with mobile SDK access enabled. Use it to authenticate mobile SDK calls for trusted enrollment.
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. The program must have mobile SDK access enabled. isNew is false when the participant already existed; a repeat call can return true while the first signup is still finishing. Targets campaignId if you pass it, otherwise GROWSURF_CAMPAIGN_ID.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"email": "<email>",
"campaignId": "<campaignId>"
},
"name": "growsurf_create_mobile_participant_token"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| Yes | |||
| language | No | The language of the participant's portal and program emails. Stored when it is one of the program's languages (`languages` in `growsurf_get_campaign_options`). A regional tag maps to its language (for example, `fr-BE` is stored as `fr`). Any other value is ignored and the program's base language applies. Applies only when this call creates the participant. Omit it 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`, `zh-TW`, `es-419`. | |
| lastName | No | ||
| metadata | No | ||
| firstName | No | ||
| ipAddress | No | ||
| campaignId | Yes | Target program id for this call: the `id` returned by `growsurf_list_campaigns`, not the program name or a share URL. Defaults to GROWSURF_CAMPAIGN_ID when omitted. Program IDs also identify newly created programs without restarting the server. | |
| referredAt | No | When the participant was referred, in Unix milliseconds. Used only with a valid `referredBy`. If you omit `referralStatus`, GrowSurf compares this time with the program's referral credit window to set it. Defaults to the time of the request. | |
| 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. |