我正在使用百度推送 API 向我的设备发送推送通知消息。但是我在响应中遇到了身份验证失败。我试图联系百度支持,但他们只是不回复。
错误响应: {“request_id”:2727123347,“error_code”:30603,“error_msg”:“身份验证失败”}
以下是我的 API 参数详细信息
----------POST 网址----------
https://api.tuisonong.baidu.com/rest/3.0/push/all
----------标题----------
Content-Type = application/x-www-form-urlencoded;charset=utf-8
User-Agent = BCCS_SDK/3.0 (Darwin; Darwin Kernel Version 14.0.0: Fri Sep 19 00:26:44 PDT 2014; root:xnu-2782.1.97~2/RELEASE_X86_64; x86_64) PHP/5.6.3 (Baidu Push Server SDK V3.0.0 and so on..) cli/Unknown ZEND/2.6.0
----------表单数据----------
apikey = XXXXXXXXXX
expires = 1593494000
msg = %7B%22title%22%3A%22hello%22%2C%22description%22%3A%22hello%20world%22%2C%22notification_builder_id%22%3A0%2C%22notification_basic_style%22%3A7%2C%22open_type%22%3A0%2C%22url%22%3A%22http%3A%2F%2Fdeveloper.baidu.com%22%2C%22pkg_content%22%3A%22%22%2C%22custom_content%22%3A%7B%22key%22%3A%22value%22%7D%2C%22target_channel_id%22%3A%22%22%7D
timestamp = 1593493655
secret_key = XXXXXXXXXXX
sign = f7a7b96457162795c491d993a1b821a7
我使用以下参考资料来准备参数和进行 API 调用。
请帮我解决这个问题。提前致谢。