--- title: Search alert limitations slug: '74' canonical_url: https://docs.coveo.com/en/74/ collection: build-a-search-ui source_format: adoc --- # Search alert limitations When you enable search alerts in a search page, you should be aware that [certain limitations apply to search-tokens](https://docs.coveo.com/en/56/). If you're using [search token](https://docs.coveo.com/en/1346/) [authentication](https://docs.coveo.com/en/2120/) in a search page, the Search API always sends email notifications to the first [user](https://docs.coveo.com/en/250/) in the array of `userIds` of the token with which the [user](https://docs.coveo.com/en/250/) who subscribes to search alert notifications authenticates. This implies that the `name` value of the first entry in the array of `userIds` you specify when creating a [search token](https://docs.coveo.com/en/1346/) should always be a valid email address. This also implies that if you're using a single [search token](https://docs.coveo.com/en/1346/) to [authenticate](https://docs.coveo.com/en/2120/) more than one [user](https://docs.coveo.com/en/250/), only the first [user](https://docs.coveo.com/en/250/) in the array of `userIds` of that token actually receives email notifications for search alerts to which any other [user](https://docs.coveo.com/en/250/) who [authenticates](https://docs.coveo.com/en/2120/) with that token subscribes. ## Example * You generate a [search token](https://docs.coveo.com/en/1346/) like the following for a single [user](https://docs.coveo.com/en/250/) whose email address is `john_doe@example.com`: ```http POST /rest/search/token HTTP/1.1 ​ Host: platform.cloud.coveo.com Content-Type: application/json Authorization: Bearer MyOAuth2Token ``` **Payload** ```json { "userIds": [ { "name": "anonymous@coveo.com", "provider": "Email Security Provider" }, { "name": "john_doe@example.com", "provider": "Email Security Provider" } ] } ``` If the [user](https://docs.coveo.com/en/250/) [authenticates](https://docs.coveo.com/en/2120/) with this [search token](https://docs.coveo.com/en/1346/) and decides to subscribe to certain search alerts, the Search API will send email notification to `anonymous@coveo.com`, which is probably not the correct address. The [user](https://docs.coveo.com/en/250/) will therefore never receive search alert email notifications. * You generate a [search token](https://docs.coveo.com/en/1346/) like the following to [authenticate](https://docs.coveo.com/en/2120/) four distinct [users](https://docs.coveo.com/en/250/): ```http POST /rest/search/token HTTP/1.1 ​ Host: platform.cloud.coveo.com Content-Type: application/json Authorization: Bearer MyOAuth2Token ``` **Payload** ```json { "userIds": [ { "name": "jane_doe@example.com", "provider": "Email Security Provider" }, { "name": "john_doe@example.com", "provider": "Email Security Provider" }, { "name": "bob_smith@example.com", "provider": "Email Security Provider" }, { "name": "alice_smith@example.com", "provider": "Email Security Provider" } ] } ``` If the [user](https://docs.coveo.com/en/250/) `john_doe@example.com` subscribes to certain search alerts, the [user](https://docs.coveo.com/en/250/) `jane_doe@example.com` will actually receive the email notifications. Moreover, if the [users](https://docs.coveo.com/en/250/) `bob_smith@example.com` and `alice_smith@example.com` also subscribe to certain search alerts, `jane_doe@example.com` will receive email notifications for those search alerts as well. * If you want search alert email notifications to work properly while still allowing your [search tokens](https://docs.coveo.com/en/1346/) to [impersonate](https://docs.coveo.com/en/2737/) the [anonymous](https://docs.coveo.com/en/m5ki3986/) identity, you should generate a {search token} like the following for each [user](https://docs.coveo.com/en/250/): ```http POST /rest/search/token HTTP/1.1 ​ Host: platform.cloud.coveo.com Content-Type: application/json Authorization: Bearer MyOAuth2Token ``` **Payload** ```json { "userIds": [ { "name": "john_doe@example.com", "provider": "Email Security Provider" }, { "name": "anonymous@coveo.com", "provider": "Email Security Provider" } ] } ```