# External Presence Interest

## POST /v1/user/presence/register

> Register interest in a user's presence status

```json
{"openapi":"3.1.1","info":{"title":"Pod API","version":"20.17.1"},"servers":[{"url":"http://yourpodURL.symphony.com/pod"}],"paths":{"/v1/user/presence/register":{"post":{"summary":"Register interest in a user's presence status","parameters":[{"schema":{"type":"string"},"name":"sessionToken","description":"Session authentication token.","in":"header","required":true}],"tags":["Presence"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponse"}}}},"400":{"description":"Client error, see response body for further details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized: Invalid session token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden: Caller lacks necessary entitlement.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not Found: user id cannot be located.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Server error, see response body for further details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserIdList"}}},"description":"List of (integer) User IDs of users whose presence to query","required":true}}}},"components":{"schemas":{"SuccessResponse":{"type":"object","properties":{"format":{"type":"string","enum":["TEXT","XML"]},"message":{"type":"string"}}},"Error":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"}}},"UserIdList":{"type":"array","items":{"type":"integer","format":"int64"}}}}}
```

### Request Example

```bash
curl -X POST \
  https://acme.symphony.com/pod/v1/user/presence/register \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -H 'sessiontoken: SESSION_TOKEN' \
  -d '[7215545078541, 7215545078461]'
```

When calling this as an [OBO-enabled endpoint](https://rest-api.symphony.com/main/apps-on-behalf-of-obo), use the [OBO User Authenticate](https://rest-api.symphony.com/main/apps-on-behalf-of-obo/obo-rsa-user-authentication-by-user-id) token for `sessionToken`.

### Querying Presence of External Users

> #### 📘 External Users Presence Visibility
>
> Any user can see the presence of other users of the same company. For users of a different company, the two users must be connected to see presence.

To query the presence of external users:

1. Call this endpoint to register interest in the desired users.
2. Call the [Get User Presence](https://rest-api.symphony.com/main/presence/user-presence-v3) endpoint to query the presence of each user.\
   To keep the registration active, call this endpoint every hour.

To query the presence of internal users, you do not need to register interest.

> #### ❗️ Rate Limit
>
> Getting an external user’s presence is limited to one call every 5 minutes.

> #### 🚧 Roles and Privileges
>
> Calling this endpoint requires the ADMIN\_PRESENCE\_UPDATE privilege.\
> See [Bot Permissions](https://docs.developers.symphony.com/building-bots-on-symphony/configuration/bot-permissions) for a list of roles and associated privileges.
