This forum is now read-only. Please use our new forums at discuss.codecademy.com.

Introduction to Twitter's API Forum

View Course » View Exercise

713 points
Picture
Submitted by
Liz Pullen
over 3 years ago

Changing permissions has no effect

I changed my Access level to read or write and regenerated an API key but Twitter doesn't acknowledge the change in permission when I try to run the code. When I checked the OAuth setting, Get is chosen...I can click on the button for Post but there is no way to submit this to change the setting.

The error message I'm getting is:
Could not send the Tweet! Code:401 Body:{"request":"\/1.1\/statuses\/update.json","error":"Read-only application cannot POST."}
nil

Does it take a while for changing the access level to take affect. The code is fine, it just seems like it's an access problem on Twitter's side. Any advice would be welcome.


1 vote

permalink

After you change your permissions, go to the Keys and Access Tokens tab, click Regenerate Consumer Key and Secret, and put the new credentials in your code. IIRC, you don't have to refresh the access token, just the consumer key.

63 points
46636ae4ac17f058b0931c429229c627?s=140&d=retro
Submitted by
gameboy70
almost 3 years ago


0 votes

permalink

Have the same problem here, i update the app on twitter to Read-Write but when i run the code i get the same errors saying "error":"Read-only application cannot POST. An ideas?

458 points
54a54d1793767679fc0011ee_395661670
Submitted by
Junior
almost 3 years ago


0 votes

permalink

Did you regenerate your access token and access token secret after changing your access level?

You will need to re-negotiate existing access tokens to alter the permission level associated with each of your application's users.

63 points
46636ae4ac17f058b0931c429229c627?s=140&d=retro
Submitted by
gameboy70
almost 3 years ago

1 Comment

54a54d1793767679fc0011ee_395661670 Junior almost 3 years ago

Oh, Yes forgot about that, thanks