Apps resource
Beta
The Push Notifications API is currently available as a Private Beta product. The information contained in this document is subject to change. You acknowledge and agree that your use of the Twilio Push Notifications API is subject to the terms of the Services in Private Beta. This means that some features are not yet implemented and others may be changed before the product is declared as Generally Available. Private Beta products are not covered by the Twilio Support Terms or Twilio Service Level Agreement.
An App resource represents a namespace that associates different Credentials with specific Device Registrations. Use Apps to separate registrations and credentials for different environments or applications.
For example, you might have a development App and a production App, or you might offer more than one user-facing application to your customers.
The API creates an App automatically when you create a Credential with an appName that doesn't exist yet. If no other Apps exist, the API sets the new App as the default. You can have a maximum of 10 Apps per account.
The name of the App. This is the unique identifier of the App.
^[a-z0-9_]+$Min length: 1Max length: 64Whether this App is the default (Push Notification) App for the Account.
The first App auto-created is automatically set as the default.
To update the default App, use PATCH /PushNotifications/Apps/{appName}.
The default Credentials for this App.
GET https://comms.twilio.com/v1/PushNotifications/Apps/{appName}
Retrieve a single App resource by making an HTTP GET request to the App resource URI with the App name.
The response includes the App's defaultCredentials array, which lists the default credential for each provider type (APN, FCM).
^[a-z0-9_]+$Min length: 1Max length: 64OK
Optional
The name of the App. This is the unique identifier of the App.
^[a-z0-9_]+$Min length: 1Max length: 64Optional
Whether this App is the default (Push Notification) App for the Account.
The first App auto-created is automatically set as the default.
To update the default App, use PATCH /PushNotifications/Apps/{appName}.
Optional
The default Credentials for this App.
Optional
Optional
GET https://comms.twilio.com/v1/PushNotifications/Apps
Returns a list of all Apps associated with your account. You can filter by date range or default status.
Filter to Push Notification Apps created after the specified date and time.
Filter to Push Notification Apps created before the specified date and time.
The number of resources to return in a page.
50Example: 50Minimum: 1Maximum: 1000OK
Optional
Optional
Metadata for paginated results. This object contains two tokens to navigate through paginated results.
- Use
nextto retrieve the 'next' page in the result list. - Use
selfto retrieve the same page of the result list again. - Supply the token in the
pageTokenquery param.
1import { TwilioClient } from "twilio-comms";23async function main() {4const client = new TwilioClient({5accountId: "<username>",6authToken: "<password>",7});8await client.pushNotifications.apps.list({9startDate: new Date("2024-01-15T09:30:00Z"),10endDate: new Date("2024-01-15T09:30:00Z"),11isDefault: true,12pageToken: "pageToken",13pageSize: 50,14});15}16main();
PATCH https://comms.twilio.com/v1/PushNotifications/Apps/{appName}
Update an existing App by making an HTTP PATCH request to the App resource URI with the App name.
Set isDefault to true to make this App the default App for your account.
^[a-z0-9_]+$Min length: 1Max length: 64application/jsonWhether this App is the default (Push Notification) App for the Account.
Set to true to set this App as the default App.
The request was accepted and a resource ID is available to check the result. The response body contains the resource ID and link to the resource.
Optional
The Resource ID is an identifier for the resource that was created or updated in response to the request.
Optional
The location (uri) of the resource identified by Resource-Id.