GetEndpointAttributes
Retrieves the endpoint attributes for a device on one of the supported push notification services, such as GCM (Firebase Cloud Messaging) and APNS. For more information, see Using Amazon SNS Mobile Push Notifications.
Request Parameters
For information about the parameters that are common to all actions, see Common Parameters.
- EndpointArn
-
EndpointArn
forGetEndpointAttributes
input.Type: String
Required: Yes
Response Elements
The following element is returned by the service.
- Attributes
- Attributes.entry.N.key (key)
- Attributes.entry.N.value (value)
-
Attributes include the following:
-
CustomUserData
– arbitrary user data to associate with the endpoint. Amazon SNS does not use this data. The data must be in UTF-8 format and less than 2KB. -
Enabled
– flag that enables/disables delivery to the endpoint. Amazon SNS will set this to false when a notification service indicates to Amazon SNS that the endpoint is invalid. Users can set it back to true, typically after updating Token. -
Token
– device token, also referred to as a registration id, for an app and mobile device. This is returned from the notification service when an app and mobile device are registered with the notification service.Note
The device token for the iOS platform is returned in lowercase.
Type: String to string map
-
Errors
For information about the errors that are common to all actions, see Common Errors.
- AuthorizationError
-
Indicates that the user has been denied access to the requested resource.
HTTP Status Code: 403
- InternalError
-
Indicates an internal service error.
HTTP Status Code: 500
- InvalidParameter
-
Indicates that a request parameter does not comply with the associated constraints.
HTTP Status Code: 400
- NotFound
-
Indicates that the requested resource does not exist.
HTTP Status Code: 404
Examples
The structure of AUTHPARAMS
depends on the signature of the API request.
For more information, see Examples
of the complete Signature Version 4 signing process (Python) in the
AWS General Reference.
Example
This example illustrates one usage of GetEndpointAttributes.
Sample Request
https://sns.us-west-2.amazonaws.com/?Action=GetEndpointAttributes
&EndpointArn=arn%3Aaws%3Asns%3Aus-west-2%3A123456789012%3Aendpoint%2FGCM%2Fgcmpushapp%2F5e3e9847-3183-3f18-a7e8-671c3a57d4b3
&Version=2010-03-31
&AUTHPARAMS
Sample Response
<GetEndpointAttributesResponse xmlns="https://sns.amazonaws.com/doc/2010-03-31/">
<GetEndpointAttributesResult>
<Attributes>
<entry>
<key>Enabled</key>
<value>true</value>
</entry>
<entry>
<key>CustomUserData</key>
<value>UserId=01234567</value>
</entry>
<entry>
<key>Token</key>
<value>APA91bGi7fFachkC1xjlqT66VYEucGHochmf1VQAr9k...jsM0PKPxKhddCzx6paEsyay9Zn3D4wNUJb8m6HZrBEXAMPLE</value>
</entry>
</Attributes>
</GetEndpointAttributesResult>
<ResponseMetadata>
<RequestId>6c725a19-a142-5b77-94f9-1055a9ea04e7</RequestId>
</ResponseMetadata>
</GetEndpointAttributesResponse>
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: