PushMessageToiOS

更新时间:
复制 MD 格式

Pushes messages to iOS devices. These messages are delivered through the proprietary channel of Alibaba Cloud Mobile Push. After the app on a device receives a message, it must handle subsequent actions, such as implementing business behaviors or creating local notifications.

Operation description

This API is deprecated. Use the advanced push API for more push capabilities. In that API, set the push platform DeviceType to iOS and the push type PushType to MESSAGE to achieve the same effect.

Before you use this API, review the billing methods and pricing for EMAS Mobile Push.

By default, this API sends messages only to online devices. If a device is offline, you can set the StoreOffline parameter. The push system then saves the message and automatically delivers it when the device comes back online.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

mpush:PushMessageToiOS

none

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

AppKey

integer

Yes

AppKey information.

24780725

Target

string

Yes

Push target. Valid values:

  • DEVICE: Push by device

  • ACCOUNT: Push by account

  • ALIAS: Push by alias

  • TAG: Push by tag

  • ALL: Push to all devices

ALL

TargetValue

string

Yes

Set based on Target. Separate multiple values with commas. If the limit is exceeded, push multiple times.

  • Target=DEVICE. Example values: deviceid111,deviceid1111 (supports up to 1,000).

  • Target=ACCOUNT. Example values: account111,account222 (supports up to 1,000).

  • Target=ALIAS. Example values: alias111,alias222 (supports up to 1,000).

  • Target=TAG. Supports single and multiple tags. For format, see Tag Format.

  • Target=ALL. Value is all.

all

Title

string

Yes

The title of the message.

my title

Body

string

Yes

The content of the message.

my body

StoreOffline

boolean

No

Whether to store the message offline. StoreOffline is set to false by default.

If stored, and the user is offline during the push, the message is sent again when the user comes online within the time-to-live (TTL). The default time-to-live (TTL) is 72 hours.

true

JobKey

string

No

The custom ID for the push Job. If JobKey is not empty, this field is included in the receipt log. For receipt logs, see Receipt Logs.

123

Response elements

Element

Type

Description

Example

object

MessageId

string

The message ID that identifies a push.

501029

RequestId

string

The request ID.

9998B3CC-ED9E-4CB3-A8FB-DCC61296BFBC

Examples

Success response

JSON format

{
  "MessageId": "501029",
  "RequestId": "9998B3CC-ED9E-4CB3-A8FB-DCC61296BFBC"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.