C#创建定时推送CreateSingleScheduleTask

D111
2017-09-29 07:09 906 0

在调用官方DLL中CreateSingleScheduleTask方法时,
传入参数

var pushPayload = new PushPayload
            {
                Platform = "[\"ios\"]",
                Notification = new Notification()
                {
                    Alert = "Hello JPush"
                }
            };
var response = client.Schedule.CreateSingleScheduleTask("SchedulePush", pushPayload, DateTime.Now.AddMinutes(1).ToString("yyyy-MM-dd HH:mm:ss"));

返回:

{"error":{
"message":"The schedule-task is invalid, 
`push` or `richpush` is invalid:sendno value is error, (1-4294967295) ",
"code":8100}}

看意思是可选参数里面的sendno字段错误,但是这个参数是可选的吧

1个回答

热门排序