AWS SDK Version 2 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

.NET Framework 3.5
Lists the endpoints and endpoint attributes for devices in a supported push notification service, such as GCM and APNS. The results for ListEndpointsByPlatformApplication are paginated and return a limited list of endpoints, up to 100. If additional records are available after the first page results, then a NextToken string will be returned. To receive the next page, you call ListEndpointsByPlatformApplication again using the NextToken string received from the previous call. When there are no more records to return, NextToken will be null. For more information, see Using Amazon SNS Mobile Push Notifications.

Namespace: Amazon.SimpleNotificationService
Assembly: AWSSDK.dll
Version: (assembly version)


public virtual ListEndpointsByPlatformApplicationResponse ListEndpointsByPlatformApplication(
         ListEndpointsByPlatformApplicationRequest request


Type: Amazon.SimpleNotificationService.Model.ListEndpointsByPlatformApplicationRequest

Container for the necessary parameters to execute the ListEndpointsByPlatformApplication service method.

Return Value
Type: Amazon.SimpleNotificationService.Model.ListEndpointsByPlatformApplicationResponse
The response from the ListEndpointsByPlatformApplication service method, as returned by SimpleNotificationService.


AuthorizationErrorException Indicates that the user has been denied access to the requested resource.
InternalErrorException Indicates an internal service error.
InvalidParameterException Indicates that a request parameter does not comply with the associated constraints.
NotFoundException Indicates that the requested resource does not exist.


This example shows how to list all mobile push applications and their attributes. For each mobile push application, this example also lists its endpoints and their attributes.

List mobile push applications and endpoints example

var snsClient = new AmazonSimpleNotificationServiceClient();
var appsResponse = snsClient.ListPlatformApplications();

foreach (var app in appsResponse.PlatformApplications)

  var appAttrsRequest = new GetPlatformApplicationAttributesRequest
    PlatformApplicationArn = app.PlatformApplicationArn

  var appAttrsResponse =

  var endpointsByAppRequest =
    new ListEndpointsByPlatformApplicationRequest
      PlatformApplicationArn = app.PlatformApplicationArn

  var endpointsByAppResponse =

  Console.WriteLine("Application: " + app.PlatformApplicationArn);
  Console.WriteLine("  Properties: ");

  foreach (var attr in appAttrsResponse.Attributes)
    Console.WriteLine("    " + attr.Key + ": " + attr.Value);

  Console.WriteLine("  Endpoints: ");

  foreach (var endpoint in endpointsByAppResponse.Endpoints)
    Console.WriteLine("     ARN: " + endpoint.EndpointArn);
    Console.WriteLine("     Attributes: ");

    foreach (var attr in endpoint.Attributes)
      Console.WriteLine("       " + attr.Key + ": " + attr.Value);

Version Information

.NET Framework:
Supported in: 4.5, 4.0, 3.5