LATEST VERSION: 1.9 - CHANGELOG
Push Notification Services v1.8

Custom User IDs

The Custom User ID feature allows you to register a device under an ID that is meaningful to your system such as their login. In addition, the same Custom User ID can be used to refer to multiple devices. This means that a push sent to the Custom User ID will be sent simultaneously to all devices registered with this Custom User ID.

Note: The Custom User ID field is case sensitive for device registrations.

Custom User ID and Topics

Custom User ID works in combination with topics so that you can target a set of Custom User IDs as well as topics and the Push Notification Service will ensure that all devices receive only 1 copy of the notification.

GET /v2/custom_user_ids

Get a list of Custom User IDs

Authentication: HTTP Basic app_uuid:api_key

Query Parameters: None

Response Body:

  {
    "custom_user_ids": [
      "string 1",
      "string 2"
    ]
  }

Examples:

  • Retrive a list of all Custom User IDs:
  {
    "custom_user_ids": [
      "custom-user-id1"
    ]
  }

GET /v2/custom_user_ids?q={query}

Get Custom User IDs by Query Parameter

Authentication: HTTP Basic app_uuid:api_key

Query Parameters:

Parameter Description
q Returns only the Custom User IDs results containing the query string provided.

Response Body:

  {
    "custom_user_ids": [
      "string 1",
      "string 2"
    ]
  }

Examples:

  • Retrive Custom User IDs by query parameter (i.e. query parameter is ‘id1’):
  {
    "custom_user_ids": [
      "custom-user-id1"
    ]
  }

Note: In order to use the Custom User IDs feature, you will have to register a device using the POST method on /v1/registration endpoint, with a custom_user_id field populated as described in Register section of the Registration API.

  {
    ...
    "custom_user_id": "custom-user-id1"
    ...
  }

For additional information regarding Registration, please consult the Registration API section of our API.

Create a pull request or raise an issue on the source for this page in GitHub