Skip to main content

Tokens generated on request (user token)

Customer Support avatar
Written by Customer Support
Updated over 2 weeks ago

If we want to automate the studies' process in our company, we need the ability to assign a token automatically, without first defining the respondent or importing a list of e-mail addressees to the system. In this case, the user token comes in handy, which means, a token that is not generated by Startquestion, but is given by the client. It has the same properties as the classic token (a blockade against the possibility of filling in several times and identifying the respondent's answers), but it can be, for example, the Customer's ID, which is provided in the link to the survey. In order to generate such a token, it is necessary to involve the IT department in building a simple script which generates unique links to the survey in the manner described below.

Description

The user_token added as a classic GET parameter to the survey's URL. The parameter can be used only when the survey has the option of individual links enabled for each respondent with enabled identification of respondents. Then the survey can be completed only once for a specific parameter value, and the added parameter will be attached to the completion, which will allow for the subsequent identification of the filling and linking it with a specific respondent.

Accompanied by the user_token parameter, you can also pass additional labels for this contact, so that they serve as additional information about the respondent (for example, customer segment, employee department, number of the attending consultant). The provision of this information allows the results to be further filtered and segmented according to the values provided in the labels.

Example URLs

Parameter descriptions

Name

Description

user_token

It is any sequence of alphanumeric characters.
The characters allowed are a-z, A-Z, 0-9, excluding diacritics.

l1

First contact label. Any sequence of alphanumeric characters.
The characters allowed are a-z, A-Z, 0-9, excluding diacritics.

l2

The second contact label. Any sequence of alphanumeric characters.
The characters allowed are a-z, A-Z, 0-9, excluding diacritics.

l3

Third contact label. Any sequence of alphanumeric characters.
The characters allowed are a-z, A-Z, 0-9, excluding diacritics.

l4

The fourth contact label. Any sequence of alphanumeric characters.
The characters allowed are a-z, A-Z, 0-9, excluding diacritics.

l5

The fifth contact label. Any sequence of alphanumeric characters.
The characters allowed are a-z, A-Z, 0-9, excluding diacritics.

l6

The sixth contact label. Any sequence of alphanumeric characters.
The characters allowed are a-z, A-Z, 0-9, excluding diacritics.

l7

The seventh contact label. Any sequence of alphanumeric characters.
The characters allowed are a-z, A-Z, 0-9, excluding diacritics.

l8

The eighth contact label. Any sequence of alphanumeric characters.
The characters allowed are a-z, A-Z, 0-9, excluding diacritics.

l9

The ninth contact label. Any sequence of alphanumeric characters.
The characters allowed are a-z, A-Z, 0-9, excluding diacritics.

Limiting User Token validity (Expiration Timestamp)

It is possible to set a date and time after which a link containing a user_token will become inactive. This is useful for surveys that need to be completed within a specific timeframe.

To do this, you need to add the user_token_exp parameter to the link, with the value being the date in Unix Timestamp format.

How to do it?

  1. Use a converter (e.g., Epoch Converter) to convert your chosen survey end date and time into a numeric format (Timestamp).

  2. Add the &user_token_exp= parameter along with the generated number to your link.

Example: https://www.startquestion.com/survey/123456/badanie.html?user_token=123456&user_token_exp=1767225600

If a respondent clicks the link after this time has passed, they will see a message stating that the survey is closed.

Expiration date as an attribute (information in the report)

Please note that the user_token_exp parameter acts as a technical block and works "in the background" – the system only uses it for verification when the link is accessed, but it does not save this date directly in the results.

If you want the expiration date to also be visible in your reports (e.g., in an XLS file, to know what deadline a specific respondent had), you should also pass this date as a standard label (e.g., using the l1 parameter).

Full link example:

...?user_token=123&user_token_exp=1767225600&l1=2026-01-20 10:00

In this scenario:

  • user_token_exp=1767225600 – blocks access to the survey after the specified time.

  • l1=2026-01-20 10:00 – saves the human-readable expiration date and time in Label 1 (in the report).


⚠️ Important note

Remember that URL parameters are visible to the recipient. There is a risk that unauthorized persons may try to manually change the date in the link (by entering a different Timestamp) to access the survey after the deadline.

To prevent this and make any interference with the parameters impossible, we recommend shortening the entire finished link.

You can use any third-party tool (e.g., Bitly) for this purpose, or use our automated solution: Webhook for shortening survey links. This ensures the technical structure of the link remains hidden from the respondent.

The presentation and analysis of the results

If the user_token parameter will be provided in the link to the survey, this information will appear in the following places:

  • In the "Collect" -> "Offline (printing tokens)" tab as new respondents, where the label will be the user_token

  • Raw data export to the CSV

  • Raw data export to the XLSX

  • Export to the SPSS

In the case of the raw data and SPSS file (apart from the system token), it will be the appropriate column in Excel or an additional variable V at the SPSS.

Did this answer your question?