For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
SDKsHelp CenterLog inSign up
    • Overview
  • Getting Started
    • API Mechanics
    • Quickstart
  • Guides
    • Communications API
    • Troubleshooting
    • Events
    • Changelog
  • Comms API Reference
      • Summary
      • GETList Device Registrations
      • POSTRegister Device for Push Notifications
      • GETGet a single Device Registration
      • DELDelete a Device Registration
      • GETList Push Notifications
      • POSTSend Push Notifications
      • GETFetch a Push Notification
      • GETList Push Notification Operations
      • GETFetch a Push Notification Operation
      • GETList Push Credentials
      • POSTCreate Push Credential
      • GETFetch a Push Credential
      • DELDelete a Push Credential
      • PATCHUpdate a Push Credential
      • GETList Push Notification Apps
      • GETFetch a Push Notification App
      • PATCHUpdate a Push Notification App
      • GETList Users
      • GETFetch a User
      • DELDelete a User
LogoLogo
SDKsHelp CenterLog inSign up
Comms API ReferencePush Notifications

List Device Registrations

GET
https://comms.twilio.com/preview/PushNotifications/DeviceRegistrations
GET
/preview/PushNotifications/DeviceRegistrations
$curl -X GET 'https://comms.twilio.com/preview/PushNotifications/DeviceRegistrations?userId=comms_pushnotificationuser_01h9krwprkeee8fzqspvwy6nq8' \
>--header 'Content-Type: application/json' \
>-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
1{
2 "deviceRegistrations": [
3 {
4 "id": "comms_device_registration_qspvwy6nq801h9krwprkeee8fz",
5 "appName": "limonade_app",
6 "userId": "comms_pushnotificationuser_01h9krwprkeee8fzqspvwy6nq8",
7 "devices": [
8 {
9 "token": "dqWD7WEC83K41WHyufTS7:APA91bFcrVaOLqKeJfSiEutJXX2Tr9wN_tYOwYd8rFA6mYUMBFqdz9n6k3v5EpFA_ukXD89hGqG3OarzbVfdjGnLOIAQfwbQcqJkjQWMrhwElrtU1y3JLDPfnjc0eTJLxzhyYvDFopEh",
10 "provider": "FCM"
11 },
12 {
13 "token": "00fc13adff785122b4ad28809a3420982341241421348097878e577c991de8f0",
14 "provider": "APN"
15 }
16 ],
17 "related": [
18 {
19 "name": "PUSH_NOTIFICATION_APP",
20 "id": "limonade_app",
21 "uri": "https://comms.twilio.com/v1/PushNotifications/Apps/limonade_app"
22 },
23 {
24 "name": "PUSH_NOTIFICATION_USER",
25 "id": "comms_pushnotificationuser_01h9krwprkeee8fzqspvwy6nq8",
26 "uri": "https://comms.twilio.com/v1/PushNotifications/Users/comms_pushnotificationuser_01h9krwprkeee8fzqspvwy6nq8"
27 }
28 ]
29 }
30 ],
31 "pagination": {
32 "next": null,
33 "self": "eyJTSyI6IkEjMDFqbmVoYm5xYWZmNDlrazUxZHA1bmN5bXciLCJTSzEiOiJBI2FjdGl2YXRlZCMyMDI1LTAzLTAzVDE3OjM3OjQ3WiMwMWpuZWhibnFhZmY0OWtrNTFkcDVuY3ltdyIsIlBLIjoiQyNBQzYwMzg4ODJiZDY5ZWIyNGM4YzU4ZGI5NjE4NjE3OTE4I0EifQ=="
34 }
35}
This operation fetches a paginated list of Device Registrations with the ID of the `User` they belong to and the name of the `App` that they are for. * A Device Registration contains a list of devices registered for a particular `User` under an `App` * The `Device` tokens in the Device Registration are used for delivering Push Notifications to the given `App` on devices or browsers belonging to a single User. * Each User will have one Device Registration for each `App`. * When sending Push Notifications to a User, all of the devices registered under the Device Registration with the corresponding `appName` are targets for the Push Notification.
Was this page helpful?
Previous

Register Device for Push Notifications

Next
Built with

This operation fetches a paginated list of Device Registrations with the ID of the User they belong to and the name of the App that they are for.

  • A Device Registration contains a list of devices registered for a particular User under an App

  • The Device tokens in the Device Registration are used for delivering Push Notifications to the given App on devices or browsers belonging to a single User.

  • Each User will have one Device Registration for each App.

  • When sending Push Notifications to a User, all of the devices registered under the Device Registration with the corresponding appName are targets for the Push Notification.

Authentication

AuthorizationBasic

Basic authentication of the form Basic <base64(username:password)>.

OR
AuthorizationBasic

Basic authentication of the form Basic <base64(username:password)>.

Query parameters

userIdstringRequiredformat: "^comms_pushnotificationuser_[0-7][a-hjkmnpqrstv-z0-9]{25,34}"

Filter Device Registrations by User.id to retrieve only registrations for that User.

appNamestringOptionalformat: "^[a-z0-9_]+$"1-64 characters

Filter Device Registrations by their appName. Must be accompanied by the userId query parameter.

pageTokenstringOptional
The token to retrieve the next page of results.
pageSizeintegerOptional1-1000Defaults to 50
The number of resources to return in a page.

Response

OK
deviceRegistrationslist of objects
List of Device Registrations.
paginationobject

Metadata for paginated results. This object contains two tokens to navigate through paginated results.

  • Use next to retrieve the ‘next’ page in the result list.
  • Use self to retrieve the same page of the result list again.
  • Supply the token in the pageToken query param.

Errors

400
Bad Request Error
429
Too Many Requests Error
500
Internal Server Error
503
Service Unavailable Error