I've been trying to access the API through a Google Script and get a rate limit 403 after just one request (actually zero, since I never get any info in the response). This occurs with and without credential use. The API works fine when I access it through cURL or the browser.
Here's my request: https://api.github.com/repos/moodle/moodle/compare/e7c8da0fb83c6bbd818fec967d...b5f3ed32a690e46fc0ad3b251
The error: " Truncated server response: {"message":"API rate limit exceeded for 107.178.195.128. (But here's the good news: Authenticated requests get a higher rate limit. Check out the d..."
The following request shows that I have zero requests left, which makes no sense since I've only made five, maybe.
function myFunctionA() {
var url = "https://api.github.com/rate_limit";
//var url = "https://api.github.com/repos/moodle/moodle/compare/e7c8da0fb83c6bbd818fec967d...b5f3ed32a690e46fc0ad3b251";
var response = UrlFetchApp.fetch(url);
var json = response.getContentText();
var data = JSON.parse(json);
Logger.log(data);
}
Logs
[16-09-19 10:13:48:745 CDT]
{rate=
{limit=60, reset=1474300805, remaining=0},
resources=
{core=
{limit=60, reset=1474300805, remaining=0},
search=
{limit=10, reset=1474298088, remaining=10}}}