401 all of a sudden


Hi, I have a lot twitter apps for websites that I use to let users sign in using Twitter.

They all worked fine until this morning, when some of theme decided to to return 401.

I use PHP withEpiTwitter by Jaisen Mathai ( http://www.jaisenmathai.com/articles/twitter-php-sign-in.html )

The script I use to make a test is as simple as:

$twitterObj = new EpiTwitter($key, $sec);

try {
$authenticateUrl = $twitterObj->getAuthenticateUrl( );
echo $authenticateUrl;
} catch ( EpiOAuthUnauthorizedException $e ) {
echo 'Failed: ';
echo $e->getMessage( );
print_r( $e );

The $key and $sec are consumer key and secret as taken from the app, I even hardcoded them by hand to be sure. My app has a callback url also, and read+write permissions. No error message is output by the way, I have to var_dump the $e variable to actually see the 401 code.

The last user that signed successfully using this system is from yesterday, I did nothing since. Still some sites do work, while other do not.

Any idea? Any advice on what to check?

Thank you.


I think I found the reason:

[data] => Invalid / suspended application

So, since in dev.twitter.com listed apps I cannot distinguish between an active or suspended app, how do I proceed now, in order to know the reason why the app was suspended, and how to avoid it in the future, and if I have to create another app or I just have to hope that the suspended ones will be reactivated?

Thank you.


Our team cannot assist with suspensions, unfortunately. Any time an app is suspended, an email is sent to the email address on file for the account that owns the application. These emails have a habit of finding themselves in spam folders, so be sure and check there for more details and the process to contest or resolve the suspension.

I don’t recommend creating or using an alternate key, as that will often be seen as circumventing your suspension, which could make the issue much worse.


Hi, my boss can’t find the email that was sent, does anybody know how to contact the twitter staff for assistance? I didn’t mange to find a form to submit a ticket or an email address :frowning:

I also tried to delete the app, but the system doesn’t do it and doesn’t even tell anything during the process.


Write to api@twitter.com from the email address belonging to the account that the application belongs to. That’ll put you in touch with the API Policy team who can assist you from there.