php - Instagram Real Time API OAuth limit exceeded -
php - Instagram Real Time API OAuth limit exceeded -
i'm trying set subscription , created business relationship , client few minutes ago. when seek send post request using php , curl, error:
{ "code":429, "error_type":"oauthratelimitexception", "error_message":"you have exceeded maximum number of requests per hour. have performed total of 5476 requests in lastly hour. our general maximum limit set @ 5000 requests per hour." }
i don't think it's possible have sent many requests in time i've had business relationship much less in past hour. there other reason instagram homecoming error?
here's code i'm using. it's 1 page handle both initial curl request , homecoming request.
<?php if (!isset($_get['hub.challenge'])) { $curl_handle = curl_init('https://api.instagram.com/v1/subscriptions/'); curl_setopt($curl_handle, curlopt_verbose, true); curl_setopt($curl_handle, curlopt_post, true); curl_setopt($curl_handle, curlopt_postfields, array( client_id => client_id, client_secret => client_secret, object => 'tag', object_id => 'kitten', aspect => 'media', callback_url => callback_url )); echo curl_exec($curl_handle); } else { echo $_get['hub.challenge']; } ?>
i have lot of experience instagram api, , i'll tell wrong. fact error has 5476 requests tells me not wrong in case either. @ 5000 requests, instagram automatically generates 429 response, meaning time nail 5000 requests time 429 response triggered, generated , pushed back, had made additional 476 requests. sounds right, in experience, happening virtually instantaneously.
furthermore, when happens, can take quite bit of time instagram take api requests particular business relationship or client id. when happens remove old app instagram developer, , create new 1 same different client id , secret.
from code have posted, looks you're recursively asking instagram search media #kitten. if , else statement both create same request ultimately, , whatever reason creating infinite loop of requests.
that's can tell you've posted - if can provide code implement instagram api (i.e. client_id, callback_url, client_secret...obviously don't need actual info, need see how , it's implemented), i'm sure figure out you.
php curl instagram
Comments
Post a Comment