Slideshare api 收到 'Failed API Validation' 错误响应
Slideshare api getting 'Failed API Validation' error response
我已经申请了 slideshare API,我得到了 API 和秘密。我所做的只是对 slideshare 的简单 GET 请求,它在标签的帮助下为我提供了结果。
这是我的 deluge 脚本,我尝试使用 API 调用 url。
根据文档,我有 unix 时间戳和 SHA1 哈希。
param = Map();
param.put("api_key","XYZ");
param.put("ts","1565085930");
param.put("hash","xxxxxxxxxxxxxxxxxxxxxxxxx");
param.put("tag","cricket");
request = invokeurl
[
url :"https://www.slideshare.net/api/2/get_slideshows_by_tag"
type : GET
parameters: param
];
info request;
这是我收到的响应错误:
<?xml version="1.0" encoding="UTF-8"?>
<SlideShareServiceError>
<Message ID="1">Failed API validation</Message>
</SlideShareServiceError>
谢谢。
看起来 API 不适用于 GET 请求。使用 POST 请求尝试相同的操作,它应该可以工作。 POSTMAN 同样失败,并且仅在请求类型更改为 POST.[=13 后才起作用=]
param = Map();
head = Map();
param.put("api_key","XXXXXXXX");
param.put("ts",1577955246);
param.put("hash","b3f3f803XXXXXXXXXXXXXXXX8be21d");
param.put("tag","cricket");
request = invokeurl
[
url :"https://www.slideshare.net/api/2/get_slideshows_by_tag"
type : POST
parameters: param
];
info request;
回复:
<?xml version="1.0" encoding="UTF-8"?>
<Tag>
<Name>cricket</Name>
<Count>0</Count>
</Tag>
Note: Should you have further questions, please let us know or please reach out to support@zohodeluge.com. We will be happy to assist you.
我已经申请了 slideshare API,我得到了 API 和秘密。我所做的只是对 slideshare 的简单 GET 请求,它在标签的帮助下为我提供了结果。
这是我的 deluge 脚本,我尝试使用 API 调用 url。 根据文档,我有 unix 时间戳和 SHA1 哈希。
param = Map();
param.put("api_key","XYZ");
param.put("ts","1565085930");
param.put("hash","xxxxxxxxxxxxxxxxxxxxxxxxx");
param.put("tag","cricket");
request = invokeurl
[
url :"https://www.slideshare.net/api/2/get_slideshows_by_tag"
type : GET
parameters: param
];
info request;
这是我收到的响应错误:
<?xml version="1.0" encoding="UTF-8"?>
<SlideShareServiceError>
<Message ID="1">Failed API validation</Message>
</SlideShareServiceError>
谢谢。
看起来 API 不适用于 GET 请求。使用 POST 请求尝试相同的操作,它应该可以工作。 POSTMAN 同样失败,并且仅在请求类型更改为 POST.[=13 后才起作用=]
param = Map();
head = Map();
param.put("api_key","XXXXXXXX");
param.put("ts",1577955246);
param.put("hash","b3f3f803XXXXXXXXXXXXXXXX8be21d");
param.put("tag","cricket");
request = invokeurl
[
url :"https://www.slideshare.net/api/2/get_slideshows_by_tag"
type : POST
parameters: param
];
info request;
回复:
<?xml version="1.0" encoding="UTF-8"?>
<Tag>
<Name>cricket</Name>
<Count>0</Count>
</Tag>
Note: Should you have further questions, please let us know or please reach out to support@zohodeluge.com. We will be happy to assist you.