# Setting player ids via URL queries

You can have the player's id set automatically based on a URL query (e.g., `MID` or `PROLIFIC_PID`). This will skip the section at the start of the game where players put in their id.

In the `public` section of your settings file, add this sort of code:

```
"public": { 
    "playerIdParam": "playerIdKey",
    "playerIdParamExclusive": false 
}
```

Where `"playerIdParam"` sets the name of the URL query parameter after which you set the player's id.  For example,  a fake app with these settings, I could set the player id directly in the URL `https://myfakeapp.meteorapp.com/?playerIdKey=3333`.

If `"playerIdParamExclusive"` is set to `true` , then players can only ever participate if their id is set by the `"playerIdParam"` (i.e., they cannot set their id in the NewPlayer page), but if it is set to `false`, then players can join both by setting their id at the NewPlayer page (if there is no query in their URL) and by having their id in the URL query set by the `"playerIdParam"`.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docsv1.empirica.ly/guides/the-settings-file/id-url-queries.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
