> For the complete documentation index, see [llms.txt](https://dev.pointr.tech/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dev.pointr.tech/features/indoor-maps/map-personas/step-2-show-a-persona-in-your-app.md).

# Step 2 - Show a Persona in Your App

Your app opens the map with a specific map persona when you add its Persona Identifier to a Pointr Express® link or your SDK setup. This page shows how to do it on each platform.

## Persona key vs. Persona Identifier

Each map persona has two IDs:

* **Persona key**: use it in the **REST API**.
* **Persona Identifier**: use it to **open the map** in Pointr Express® or an SDK.

<table><thead><tr><th width="158.3125"></th><th width="303.1484375">Persona key</th><th>Persona Identifier</th></tr></thead><tbody><tr><td><strong>ID</strong></td><td><code>staff</code></td><td><code>0Xthx</code></td></tr><tr><td><strong>What it is</strong></td><td>The map persona's fixed name. The same for every client.</td><td>A short code for your client. You can change it in <a href="https://dev.pointr.tech/features/indoor-maps/map-personas/step-1-configure-map-personas-in-pointr-cloud.md#configure-map-personas">Step 1</a>.</td></tr><tr><td><strong>Where to find it</strong></td><td>The <a href="https://dev.pointr.tech/features/indoor-maps/map-personas.md#what-map-personas-are-available">What Map Personas are available</a> table, or the <code>key</code> field in the API response</td><td><strong>Settings → Map Personas</strong> in Pointr Cloud (screenshot below), or the <code>personaIdentifier</code> field in the API response</td></tr><tr><td><strong>Where you use it</strong></td><td><code>{personaKey}</code> in REST API paths, and values in <code>mapPersonas</code></td><td><code>pid</code> in Pointr Express® links, and the map persona option in each SDK (see <a href="https://dev.pointr.tech/features/indoor-maps/map-personas/step-2-show-a-persona-in-your-app.md#add-the-persona-identifier">Add the Persona Identifier</a>)</td></tr><tr><td><strong>Usage example</strong></td><td><code>PUT …/personas/staff</code><br><code>"mapPersonas": ["staff", "vip"]</code><br>(full endpoints in <a href="https://dev.pointr.tech/features/indoor-maps/map-personas/step-1-configure-map-personas-in-pointr-cloud.md#configure-map-personas">Step 1</a>)</td><td><code>?token=&#x3C;TOKEN>&#x26;pid=fz724</code><br><code>personaIdentifier: "fz724"</code></td></tr></tbody></table>

<div align="left"><figure><img src="https://2107440607-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX0ubTdDuDEByHfWtKKVg%2Fuploads%2F028gpOj3kJ7y2UlrYy95%2Fmap-persona-id.png?alt=media&#x26;token=478187b3-7e46-45b0-9f34-abdd42c80db3" alt="Map Personas page in Pointr Cloud Dashboard settings, showing the Persona Identifier for each map persona"><figcaption></figcaption></figure></div>

## Add the Persona Identifier

{% hint style="info" %}
The map shows **one map persona at a time**. If you don't add a Persona Identifier, it uses your default map persona, which is **Customer**, unless you changed it in [Step 1](https://dev.pointr.tech/features/indoor-maps/map-personas/step-1-configure-map-personas-in-pointr-cloud.md#configure-map-personas).
{% endhint %}

<table><thead><tr><th width="129.23046875">Platform</th><th width="178.265625">Parameter</th><th width="184.34375">Example</th><th>To switch map persona</th></tr></thead><tbody><tr><td>Pointr Express®</td><td><code>pid</code> in the link</td><td><code>?token=&#x3C;TOKEN>&#x26;pid=fz724</code></td><td>Open a link with a different <code>pid</code></td></tr><tr><td>Web SDK</td><td><code>personaIdentifier</code> option</td><td><code>personaIdentifier: "fz724"</code></td><td>Start the MapWidget again, for example by reloading the page</td></tr><tr><td>iOS</td><td><code>personaIdentifier</code> in <code>PTRParams</code></td><td><code>personaIdentifier: "fz724"</code></td><td>Start the SDK again with a different value</td></tr><tr><td>Android</td><td><code>personaId</code> in <code>PTRParams</code></td><td><code>personaId = "fz724"</code></td><td>Start the SDK again with a different value</td></tr><tr><td>React Native (v10.5.0+)</td><td><code>personaId</code> in <code>PTRConfiguration</code></td><td><code>personaId: 'fz724'</code></td><td>Set once per app session</td></tr></tbody></table>

{% hint style="warning" %}
`fz724` is an example. Replace it with your own Persona Identifier, which you can find and rename in Pointr Cloud. For the full code for each platform, see the tabs below.
{% endhint %}

{% tabs %}
{% tab title="Pointr Express®" %}
{% hint style="info" %}
**Pointr Express® for v10 is coming soon.** Until then, v10 customers can use Pointr Express® v9, so the links below use `v9.pointr.express`.
{% endhint %}

There are two ways to add the map persona to a Pointr Express® link.

**1. In the token (recommended).** When you generate a token with the Pointr Express® Link Service, add `pid` to `expressParameters`:

```json
{
  "clientIdentifier": "<CLIENT_ID>",
  "clientSecret": "<CLIENT_SECRET>",
  "clientUrl": "<BASE_URL>",
  "expressParameters": "s=<SITE_INTERNAL_ID>&pid=<PERSONA_IDENTIFIER>"
}
```

Every link built from this token opens with that map persona. Use this for fixed links and physical QR codes.

```
https://v9.pointr.express/?token=<TOKEN>
```

**2. In the URL.** Add `&pid=<PERSONA_IDENTIFIER>` to any link. Use this to reuse one token for several map personas.

```
https://v9.pointr.express/?token=<TOKEN>&pid=<PERSONA_IDENTIFIER>
```

See also: [Managing Pointr Express® Links](broken://pages/Lj606v96y37SQhNCym7x) (how to generate a token)
{% endtab %}

{% tab title="Web SDK" %}
Set the `personaIdentifier` option:

```javascript
document.addEventListener("DOMContentLoaded", function () {
  const options = new PointrWebSDK.Options({
    container: "pointr-map",
    baseUrl: "<BASE_URL>",
    clientIdentifier: "<CLIENT_ID>",
    licenseKey: "<LICENSE_KEY>",
    siteInternalIdentifier: "<SITE_INTERNAL_ID>",
    personaIdentifier: "<PERSONA_IDENTIFIER>"
  });

  const pointrWeb = new PointrWebSDK.MapWidget(options);
  pointrWeb.start();
});
```

See also: [Web - Quick Start](broken://pages/RYgPFfExjrqenatDBstZ) and [Web SDK Options Reference](broken://pages/jfILLyJZnfDRZXmODSXo)
{% endtab %}

{% tab title="iOS" %}
Set `personaIdentifier` in `PTRParams`:

```swift
let configuration = PTRMapWidgetConfiguration()
configuration.sdkParams = PTRParams(
    clientIdentifier: "<CLIENT_ID>",
    licenseKey: "<LICENSE_KEY>",
    baseUrl: "<BASE_URL>",
    personaIdentifier: "<PERSONA_IDENTIFIER>"
)

let location = PTRMapWidgetLocation.site(siteId: PTRIdentifier("<SITE_INTERNAL_ID>"))
let mapWidget = PTRMapWidgetViewController(location: location, configuration: configuration)
present(mapWidget, animated: true, completion: nil)
```

See also: [Mobile - Quick Start](broken://pages/Y3QQxljq9ApCHrAcVwVf) and [iOS SDK References](broken://pages/jLKF8FFvhINPW3zZrZdO) (open your SDK version, then `PTRParams`)
{% endtab %}

{% tab title="Android" %}
Set `personaId` in `PTRParams`:

```kotlin
val configuration = PTRMapWidgetConfiguration.defaultConfiguration()
configuration.sdkParams = PTRParams(
    clientId = "<CLIENT_ID>",
    licenseKey = "<LICENSE_KEY>",
    baseUrl = "<BASE_URL>",
    personaId = "<PERSONA_IDENTIFIER>"
)

val location = PTRMapWidgetLocation("<SITE_INTERNAL_ID>")
val action = PTRMapWidgetAction.focusMap(location)

val mapWidget = PTRMapWidgetFragment.newInstance(
    supportFragmentManager,
    R.id.fragment_container,
    configuration,
    action
)
```

See also: [Mobile - Quick Start](broken://pages/Y3QQxljq9ApCHrAcVwVf) and [Android SDK References](broken://pages/5Y2VWOmwReRVXjLJV5OM) (open your SDK version, then `PTRParams`)
{% endtab %}

{% tab title="React Native" %}
Set `personaId` in `PTRConfiguration` (v10.5.0 or later):

```tsx
import { PTRMapWidget, PTRFocusMapAction } from 'react-native-pointr';
import type { PTRConfiguration } from 'react-native-pointr';

const SDK_CONFIG: PTRConfiguration = {
  clientId: '<CLIENT_ID>',
  licenseKey: '<LICENSE_KEY>',
  baseUrl: '<BASE_URL>',
  personaId: '<PERSONA_IDENTIFIER>'
};

export default function MapScreen() {
  return (
    <PTRMapWidget
      style={{ flex: 1 }}
      sdkConfig={SDK_CONFIG}
      action={new PTRFocusMapAction('<SITE_EXTERNAL_ID>')}
    />
  );
}
```

See also: [React Native API Reference](broken://pages/4a0cc579ff10396da26730734edea38811fd6e40) (`PTRConfiguration`)
{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://dev.pointr.tech/features/indoor-maps/map-personas/step-2-show-a-persona-in-your-app.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
