cURL request to authenticate & authorize Twitter API

oauth

#1

Hi all,

This is a beginner question but I am having issues authorizing the Twitter API using a cURL request.

I am doing:

curl -X POST "https://api.twitter.com/oauth2/token" -h "Authorization:Basic base64_encoded_consumer_key:consumer_secret" -h "Content-Type:application/x-www-form-urlencoded;charset=UTF-8" -h -d "grant_type=client_credentials"

Rather than the 200 OK I receive just a list of possible curl request commands.

Any help would be really appreciated. Thank you for the time.


#2

@andypiper any idea?


#3

-h is help, use -H for headers.