Can an individual (not program) login with OAuth


#1

I would like to update my status from a program. However, I cannot figure out how to get my OAuth credentials for my account. Is what I am hoping to do possible?


#2

Yes, there is documentation on Oauth user authentication on the dev website.


#3

Thank you!

I have attempted to use oauth 2 to get login credentials (terminology?) I consistently get a the reply:

{“errors”:[{“code”:99,“message”:“Unable to verify your credentials”,“label”:“authenticity_token_error”}]}

I am using curl with this command:

curl -v --request ‘POST’ ‘https://api.twitter.com/oauth2/token’ -H ‘Authorization: Basic XYZ===’ -H “Content-Type: application/x-www-form-urlencoded; charset=utf-8” -d “grant_type=client_credentials”

Where XYZ=== is replaced with my base64’ed consumer key and consumer secret.

Does the form of my curl command look correct?

Thank you again for your reply.


#4

I figured out my error. It was in the creation of the BASE64 string. I originally did this:

echo 'STRING' | base64

Which implicitly adds a new line at the end of the string,
Instead of this

echo -n 'STRING' | base64

Which does not append a newline before piping to the base64 command.


#5