I keep get "Your credentials do not allow access to this resource." when I try to destroy friendships. What am I missing?


#1

I keep get “Your credentials do not allow access to this resource.” when I try to destroy friendships in my account.

My account allows my app to read, write and direct messages.

I connect using https://api.twitter.com/oauth2/token

Then I use the access token for POST https://api.twitter.com/1.1/friendships/destroy.json (user_id=000000) and I don’t have permission.
Other API functions work fine.

What am I missing?


#2

If you’re using app-only auth, and it sounds like you are, you don’t have a user context with which to follow another user. You’re only identified as an application and applications can’t follow users.


#3

That makes sense. So what should I do to get user context and use this function? Do I need to do this as a website or something like that?


#4

Use our OAuth 1.0A flow to negotiate an access token on behalf of the user taking the action. If this is just for personal use, we have a function to create your own access token as part of the app management system. Make sure your app is configured for both read and write operations before creating the token. Then use signed OAuth 1.0A requests with your access to execute this endpoint.


#5

Ok thanks, I’ll try that. I’ll look up your function too.


#6

Hi., I am trying to tweet image with using twitteroauth library.
I get this error as “Your credentials do not allow access to this resource.”.

I have changed the x-auth-mode to reverse-auth., but still I couldn’t tweet the image. It still says the same.

Can you please help?


#7

Hi,
I am using the same procedure that you recommended, but I still get the error “220 Your credentials do not allow access to this resource”. I have an oauth call back that retrieves the oauth_token from the oauth_verifier.
What could be the cause of the error ?

Thanks
Dexter


#8

I’m also getting the same error: “Your credentials do not allow access to this resource.” when I 'm trying to use “statuses/update” API

Are there new changes with this API’s method? I hope you can help me solve this issue.

Thanks!!!