Internal error 131


#1

I made this request

https://api.twitter.com/1.1/search/tweets.json?q=cliff&max_id=282274845234970623

and got “internal error” (code = 131) in response. Then, I made the same request 5 seconds afterwards and got no error in response.

I notice this happens infrequently but regularly – maybe once every few hundred requests.


#2

I am bumping this because I still see this error. Not sure how I should handle it. Right now I am just ignoring the error (and repeating the request) without any issues. The error doc says I am supposed to report this error. Please advise.


#3

I think this is a bug so I submitted it as Issue #788.

https://dev.twitter.com/issues/788


#4

I experienced a similar problem last week. Everyone was on vacation so I left it to test again later. I just tried it again and still get a 413 http code every time I try using max_id. There is no response message. Here is the PHP code for use with tmhOAuth:

	$connection->request('GET',$connection->url('1.1/search/tweets'), 
    	array('q' => $query,
		'count' => 100,
		'include_entities' => false,
		'type' => 'recent',
		'max_id' => $max_id));

#5

Adam,

I think your issue has a different cause from mine. The 131 error from Twitter comes with an HTTP 500 code, not a 413 code. 413 means your request was “too large.”

I am looking at your code and wondering why you are missing the “.json” in your URL. Should it be like this?

$connection->request(‘GET’,$connection->url(‘1.1/search/tweets.json’),

Just curious. I am not too familiar with PHP.

Jonas


#6

No. The json is not needed for this library. That is certain. I’ve been using this library fo years. The same
code works fine without the max_id parameter. My theory is that max_id
causes breakage in several ways. My case causes the server to barf to
the point that there is too much data returned. Either way, max_id
with /search/tweets fails for both of us.


#7

Hi, we’re getting the same error with API 1.1, using a valid just obtained Bearer Token.
The request is for statuses/user_timeline.json
With only one parameter: screen_name.

The StatusCode = 500
The StatusDescription = Internal Server Error
And the response is: {“errors”:[{“message”:“Internal error”,“code”:131}]}

So it seems it’s an API error. Can you please check this?
Best regards, @SaantsDI


#8

Saantsdi
I think if you simply execute your request again you will find it succeeds the 2nd time. Considering the millions of requests twitter handles daily, it’s reasonable to expect a few requests will fail.


#9

Im getting the same error now.

Is there anyway to solve this ??

Regards,
Sajid


#10

This is a very old thread. Can you please be more specific about which endpoint you’re calling, how you’re invoking it, and when this error occurs.


Webhook Delete: Internal Error
#11

Hi Andy,
Greetings.

I am trying to delete my webhook subscription using the below api

https://developer.twitter.com/en/docs/accounts-and-users/subscribe-account-activity/api-reference/delete-subscription.

I am sending this sample request

https://api.twitter.com/1.1/account_activity/webhooks/9285MYWBIDNUMBER.json

My code was working perfectly yesterday but now im getting this error.

Thanks,
Sajid


#12

Hi Sajid - can you confirm you are using the correct route on your DELETE request? Your example is missing the subscriptions.json suffix assuming you are trying to delete the subscriptions.

https://api.twitter.com/1.1/account_activity/webhooks/:webhook_id/subscriptions.json

If you are trying to delete the webhook, your request is accurate, but will return errors on subsequent requests as you have removed the Webhook already.


#13

Hi Kyle,

Yes i was trying to delete the webhook (not the subscriptions) …
This service was working perfectly fine up until Thursday.
From friday i am unable to remove the webhook.

Removing webhook gives the internalError 131.
I tried to add register/add a webhook

Ad it gives me the below error

{“errors”:[{“code”:214,“message”:“Too many resources already created.”}]}

Requesting help.
We are eyeing to go live next week .


#14

Hi @KyleW ,
Requesting assistance.

Regards,
Saj


#15

Hi @andypiper,

Requesting assistance on this.

Regards,
Saj


#16

@joncipriano

Hi Jon,

Removing webhook gives the internalError 131.
I tried to add register/add a webhook

Ad it gives me the below error

{“errors”:[{“code”:214,“message”:“Too many resources already created.”}]}

Requesting help.
Regards


#17

I have the exact same problem than the one described by sajidcis… Everything used to work fine, I could delete the webhook to register it on a new URL. But now I get a

{
    "errors": [
        {
            "message": "Internal error",
            "code": 131
        }
    ]
}

when calling the DELETE account_activity/webhooks/:webhook_id endpoint


#18

We confirm having the same error when trying to delete the webhook. It was working fine until recently as well.
We get the same error code :

{
  "errors": [
    {
      "message": "Internal error",
       "code": 131
    }
  ]
}

#19

I’m going to point folks coming to this thread to discuss error 131 on webhooks to this alternative thread where the workaround has been discussed. Closing this thread (it started in 2012 and has gone way off original topic).


#20