Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Copilot Lvl 2
Message 1 of 3

How to increase the request limit for simple API client applications?

I am developing a simple JavaScript Node.js client application that parses an JIRA export XML file and creates GitHub issues, sets their state, and adds the comments. I'm using this to migrate OASIS OSLC Core issues to GitHub as part of simplifying the Technical Committee's work.

 

The problem I'm runing into is that I have about 200 issues to migrate, and each issue takes anywhere from 2 to 10 API requests, depending on how many comments have been added. So I'm quickly exceeding the 60 requests/hour limit.

 

Since this is a node.js client application, I don't think there's an easy way to add OAuth support (I'm using request.js to make HTTP requests). 

 

Is there some other way I can at least temporarly adjust the server's rate limit in order to migrate these issues?

2 Replies
Ground Controller Lvl 1
Message 2 of 3

Re: How to increase the request limit for simple API client applications?

Why not OAuth? 
Its can be easly integrated with your Request module. Look are here, y"ll need  just add to header:
https://www.npmjs.com/package/oauth-1.0a 


Copilot Lvl 2
Message 3 of 3

Re: How to increase the request limit for simple API client applications?

Ok, I get an OAuth access token and updated my app to use that. But I still get the 403 error with this message:

{ message:

   'You have triggered an abuse detection mechanism and have been temporarily blocked from content creation. Please retry your request again later.',

  documentation_url: 'https://developer.github.com/v3/#abuse-rate-limits' }

 

while the headers indicate the rate limit hasn’t been exceeded:

 

 'x-ratelimit-limit': '5000',

  'x-ratelimit-remaining': '4847',

  'x-ratelimit-reset': '1544559287',

  'x-oauth-scopes': 'public_repo',

 

Am I making too many calls too fast?

 

Here's how I did the request:

 

requestOptions = {
uri: request_data.url,
headers: {
'User-Agent': github.user,
'Authorization': 'token xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
},
/*auth: {
'user': github.user,
'pass':github.token
},*/
json: {state: issue.state},
method: request_data.method
};
request(requestOptions, (error, response, body) => {