Hi,
we are using premium account activity API. While adding subcriptions or removing subscriptions, we are getting an error with error code 131 and it is not consistent too. Sometime the subscription happens successfully and sometimes it throws 131 error. Could you please help us why this error occurs and ways to prevent it.
“error”:{“errors”:[{“message”:“Internal error”,“code”:131}]}.

Hi @fd_social - could you share how you’re creating these requests to the API?

1 Like

Hi @Hamza

We have configured dev environment in our account, registered a webhook with necessary url and making a post request to the endpoint https://api.twitter.com/1.1/account_activity/all/:env_name/subscriptions.json with the respective “env_name” to add subscriptions. We are under premium tier of Account Activity API

A brief implementation is something like below,

var request_options = {
uri: ‘https://api.twitter.com/1.1/account_activity/all/:env_name/subscriptions.json’,
oauth: {
consumer_key: consumerKey,
consumer_secret: consumerSecret,
token: accessToken,
token_secret: secretToken,
},
}

request.post(request_options)
.then(response => {
console.log(true);
})
.catch(error => {
console.log(error);
});

Similarly delete call for delete the subscription.

Hi,

Stuck at this 131 error response, can you please let us know what is being done wrong or how to prevent this?

Hi,

This is kind of affecting our implementation. Can you please look into this and provide a solution?

You said this happens sometimes, but not others. Can you be any more specific? Does this always happen for some users and not for others, or does this sometimes happen both ways for the same users?

The issue is sporadic. For some users it does not happen, but for others it happens and when we retry it succeeds and for some users it always throws this error. There isn’t a definite pattern on when it throws error.

Is there discrepancy in the request given above? Are we missing something ?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.