Menu
Amazon Pinpoint
REST API Reference

APNs Sandbox Channel

A channel defines the types of platforms to which you can deliver messages. Before you can use Amazon Pinpoint to send messages to the Apple Push Notification service (APNs) sandbox environment, you must create an APNs sandbox channel. You can use this resource to create, update, look up, or delete an APNs sandbox channel.

URI

/v1/apps/application-id/channels/apns_sandbox

HTTP Methods

DELETE

Delete an APNS sandbox channel

Header

Name Required Type

accept

false

string

Path

Name Required Type

application-id

true

string

Response

Status Code Schema

200

APNSSandboxChannelResponse

GET

Get an APNS sandbox channel

Header

Name Required Type

accept

false

string

Path

Name Required Type

application-id

true

string

Response

Status Code Schema

200

APNSSandboxChannelResponse

PUT

Update an APNS sandbox channel

Body

Name Required Type

APNSSandboxChannelRequest

true

APNSSandboxChannelRequest

Header

Name Required Type

accept

false

string

Path

Name Required Type

application-id

true

string

Response

Status Code Schema

200

APNSSandboxChannelResponse

Errors

Errors

Status Code Schema Error Type

400

MessageBody

BadRequestException

403

MessageBody

ForbiddenException

404

MessageBody

NotFoundException

405

MessageBody

MethodNotAllowedException

429

MessageBody

TooManyRequestsException

500

MessageBody

InternalServerErrorException

Schemas

Request Schemas

Example APNSSandboxChannelRequest

Copy
{ "Certificate": "string", "PrivateKey": "string", "Enabled": true, "TokenKeyId": "string", "TeamId": "string", "TokenKey": "string", "BundleId": "string", "DefaultAuthenticationMethod": "string" }

Response Schemas

Example APNSSandboxChannelResponse

Copy
{ "ApplicationId": "string", "IsArchived": true, "Version": 0, "CreationDate": "string", "LastModifiedDate": "string", "LastModifiedBy": "string", "Id": "string", "Enabled": true, "HasCredential": true, "Platform": "string", "HasTokenKey": true, "DefaultAuthenticationMethod": "string" }

Example MessageBody

Copy
{ "RequestID": "string", "Message": "string" }

Attributes

APNSSandboxChannelRequest

Attribute Type Description

BundleId

string

The bundle id used for APNs Tokens.

Certificate

string

The distribution certificate from Apple.

DefaultAuthenticationMethod

string

The default authentication method used for APNs.

Enabled

boolean

If the channel is enabled for sending messages.

PrivateKey

string

The certificate private key.

TeamId

string

The team id used for APNs Tokens.

TokenKey

string

The token key used for APNs Tokens.

TokenKeyId

string

The token key used for APNs Tokens.

APNSSandboxChannelResponse

Attribute Type Description

ApplicationId

string

The ID of the application to which the channel applies.

CreationDate

string

When was this segment created

DefaultAuthenticationMethod

string

The default authentication method used for APNs.

Enabled

boolean

If the channel is enabled for sending messages.

HasCredential

boolean

Indicates whether the channel is configured with APNs credentials. Amazon Pinpoint uses your credentials to authenticate push notifications with APNs. To use APNs token authentication, set the BundleId, TeamId, TokenKey, and TokenKeyId attributes. To use certificate authentication, set the Certificate and PrivateKey attributes.

HasTokenKey

boolean

Indicates whether the channel is configured with a key for APNs token authentication. Provide a token key by setting the TokenKey attribute.

Id

string

Channel ID. Not used, only for backwards compatibility.

IsArchived

boolean

Is this channel archived

LastModifiedBy

string

Who last updated this entry

LastModifiedDate

string

Last date this was updated

Platform

string

The platform type. Will be APNS_SANDBOX.

Version

integer

Version of channel

MessageBody

Attribute Type Description

Message

string

The error message returned from the API.

RequestID

string

The unique message body ID.