高级推送接口V2。
接口说明
请确保在使用该接口前,以充分了解 EMAS 移动推送产品的收费方式和价格。
本接口区分 Android 和 iOS 平台,对于不同平台的推送调用,需要传入平台对应的 AppKey。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
授权信息
下表是API对应的授权信息,可以在RAM权限策略语句的Action元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:
- 操作:是指具体的权限点。
- 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
- 资源类型:是指操作中支持授权的资源类型。具体说明如下:
- 对于必选的资源类型,用前面加 * 表示。
- 对于不支持资源级授权的操作,用
全部资源表示。
- 条件关键字:是指云产品自身定义的条件关键字。
- 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
| 操作 | 访问级别 | 资源类型 | 条件关键字 | 关联操作 |
|---|---|---|---|---|
| mpush:PushV2 | none | *全部资源 * |
| 无 |
请求参数
| 名称 | 类型 | 必填 | 描述 | 示例值 |
|---|---|---|---|---|
| AppKey | long | 是 | AppKey 信息。 | ****530646 |
| IdempotentToken | string | 否 | 用于防止 API 调用端重试造成服务端重复推送的一个幂等参数。15 分钟内使用相同 IdempotentToken 进行调用时,只会进行一次推送,后续返回第一次成功推送的结果。 说明
| c8016d13-6e76-****-9bda-769383d11787 |
| PushTask | PushTask | 是 | 推送任务。 |
请您阅读文档 PushV2 接口接入指南获取更多指导。
返回参数
示例
正常返回示例
JSON格式
{
"MessageId": "11747540****88320",
"RequestId": "159E4422-6624-****-8943-DFD98D34858C"
}错误码
| HTTP status code | 错误码 | 错误信息 | 描述 |
|---|---|---|---|
| 400 | InvalidPeriod.ExceedDays | The period between specified EndTime and StartTime exceeds %s days. | 开始时间和结束时间超过%s天。 |
| 400 | Invalid%s.Format | The specified %s format is invalid. | 参数格式错误。 |
| 400 | AccountDisabled | Your account is not enabled. | 功能未启用。 |
| 400 | FileNotExist | The specified file does not exist. | 指定的文件不存在。 |
| 400 | IncorrectPassword | The password is incorrect. | 密码错误。 |
| 400 | NotApnsCertificate | The Certificate is not an APNs certificate. | 不是APNs证书。 |
| 400 | PermissionDenied | The specified AppKey is not authorized. | 您没有访问该app的权限,请您检查Appkey参数是否属于该账户。 |
| 400 | SendSpeedNotSupported | SendSpeed is not supported for specified Target. | 制定目标不支持SendSpeed参数。 |
| 400 | SmsProfileConfigFailed | Failed to configure SMS profile. | SMS配置失败。 |
| 400 | SmsProfileGetFailed | Failed to get SMS profile. | SMS配置获取失败。 |
| 400 | SmsRoleAuthorizeFailed | Failed to authorize SMS role. | SMS角色授权失败。 |
| 400 | SmsRoleUnauthorized | The SMS role is unauthorized. | SMS角色没有授权。 |
| 400 | TagsNumberBeyondLimit | The number of tags bound to this app exceeds the limit. | 当前app绑定的tag数量超过限制。 |
| 400 | Invalid%s.LengthExceed | The specified %s length cannot be greater than %s. | 参数长度超限。 |
| 400 | Invalid%s.BytesExceed | The specified %s exceeds the %s bytes limit. | 参数的字节数超限。 |
| 400 | Invalid%s.Empty | The specified %s cannot be empty. | 参数不能为空。 |
| 400 | Invalid.Parameter | The specified parameter is invalid: %s. | 参数%s无效。 |
| 400 | TargetNotSupported | Target is not supported for batch push. | 批量推送不支持的Target。 |
| 400 | TargetNotSupported | Target is not supported for file push. | 文件推送不支持的Target。 |
| 400 | TargetNotSupported | Target is not supported for iOS live activity. | iOS灵动岛推送不支持的target |
| 500 | InternalError | The request processing has failed due to some unknown error. Please try again. If the error still exists, submit a ticket. | 服务端错误,建议重试,仍然失败则提工单 |
| 500 | Timeout | The request processing is timeout. | 请求处理超时。 |
访问错误中心查看更多错误码。
