在使用Slideshare API时遇到麻烦

时间:2017-09-05 12:04:42

标签: javascript ajax api

我有API_KeySecret_Key。要访问API,我必须提供以下参数:

api_key: Set this to the API Key that SlideShare has provided for you.

ts: Set this to the current time in Unix TimeStamp format, to the nearest second(?).

hash: Set this to the SHA1 hash of the concatenation of the shared secret and the timestamp (ts). i.e. SHA1 (sharedsecret + timestamp). The order of the terms in the concatenation is important.

我尝试使用幻灯片搜索功能 - 我以这种方式提供了所需的参数 - 但仍然给我错误:Failed API validation - 问题在哪里?

"https://www.slideshare.net/api/2/search_slideshows?api_key=API_Key&ts="+ Math.round((new Date()).getTime() / 1000) + "&hash="+ sha1(Secret_Key + Math.round((new Date()).getTime() / 1000)) +"&q=ionic view"

请确认这是否是在javascript

中以Unix TimeStamp格式发布当前时间的正确方法
Math.round((new Date()).getTime() / 1000)

0 个答案:

没有答案