Your credentials do not allow access to this resource.!



Hi ,

my twitter integration was working fine for the past few months until someone reported an issue.
we now realized that despite using GET oauth/authorize to get the token to post to a user profile on his behalf, we still have this error. I can confirm that the token we get when a user authorize is correct because when using my own twitter account to test I can see it’s the same I see on my app profile under keys and access tokens.

is there any issue with the twitter API ? please help as this happen on our live environment


Which resource exactly are you trying to access? It sounds like you are using read-only keys.


I am trying to post a tweet using “statuses/update”. I am using oauth/authorize to get authorization and the screen let the user knows that the app will be able to post tweets on his/her behalf. then i store the token. this has been implemented last year but it’s only now that it’s not working any more. it’s the same even when I use the token to post to my own tweeter account. from my app dashboard i can copy my token and secret as well as my tweeter tokens but it still does not work


Ok, can you provide any code? I have no idea why the things you describe could happen.

$connection = new TwitterOAuth($this->container->getParameter('twitter_consumer_key'),$this->container->getParameter('twitter_consumer_secret'),$token,$token_secret);
$post = $connection->post('statuses/update',array('status' => $post->getContent()));

this is my php code. I am using Abraham Williams PHP library.

and I use the below code to get the authorize url. twitter redirect to me with token and token secret after asking the user whether he allows that my app post to tweeter as well as some other permissions.

$url = $connection->getAuthorizeURL($token);