Menu
Amazon Pinpoint
REST API Reference

GCM Channel

A channel defines the types of platforms to which you can deliver messages. To deliver a push notification to an Android device, you send the message through the Google Cloud Messaging (GCM) channel type. You can use this resource to create or update a GCM channel.

URI

/v1/apps/application-id/channels/gcm

HTTP Methods

DELETE

Deletes the GCM channel for an app.

Header

Name Required Type

accept

false

string

Path

Name Required Type

application-id

true

string

Response

Status Code Schema

200

GCMChannelResponse

GET

Returns information about the GCM channel for an app.

Header

Name Required Type

accept

false

string

Path

Name Required Type

application-id

true

string

Response

Status Code Schema

200

GCMChannelResponse

PUT

Use to update the GCM channel for an app.

Body

Name Required Type

GCMChannelRequest

true

GCMChannelRequest

Header

Name Required Type

accept

false

string

Path

Name Required Type

application-id

true

string

Response

Status Code Schema

200

GCMChannelResponse

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 GCMChannelRequest

Copy
{ "ApiKey": "string", "Enabled": true }

Response Schemas

Example GCMChannelResponse

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

Example MessageBody

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

Attributes

GCMChannelRequest

Attribute Type Description

ApiKey

string

Platform credential API key from Google.

Enabled

boolean

If the channel is enabled for sending messages.

GCMChannelResponse

Attribute Type Description

ApplicationId

string

The ID of the application to which the channel applies.

CreationDate

string

When was this segment created

Credential

string

The GCM API key from Google.

Enabled

boolean

If the channel is enabled for sending messages.

HasCredential

boolean

Indicates whether the channel is configured with FCM or GCM credentials. Amazon Pinpoint uses your credentials to authenticate push notifications with FCM or GCM. Provide your credentials by setting the ApiKey attribute.

Id

string

Channel ID. Not used. Present 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 GCM

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.