我已经处理了获取有效访问令牌的过程;
尽管如此,现在我仍然无法从服务器获取数据;
我检查了论坛和其他网页,但我无法弄清楚我做错了什么;
我正在运行以下 Google 应用程序脚本:
var jawbone_access_token = "my private access token - long string";
var options = {
'Accept' : 'application/json',
'Authorization' : 'Bearer ' + jawbone_access_token
}
var jawbone_request = "https://jawbone.com/nudge/api/v.1.1/users/@me";
response = UrlFetchApp.fetch(jawbone_request, options).getContentText();
writeLog(response);
尽管如此,我总是得到以下回应:
错误 - Stau:Exception: Fehler bei der Anfrage für https://jawbone.com/nudge/api/v.1.1/users/@me。Folgender Code wurde zurückgegeben: 404. Gekürzte Serverantwort: {"meta": {"error_detail": "不支持的 API 1.1 版,除非使用 OAuth 标头调用", "code": 404, "error_type": "endpoint_error", "time ": 1.... Verwenden Sie "muteHttpExceptions", um die vollständige Antwort zu lesen。
你能帮我弄清楚我做错了什么吗?
非常感谢您的帮助;
最好的问候鲁道夫