Skip to content

Instantly share code, notes, and snippets.

@cevaris
Last active September 8, 2015 19:19
Show Gist options
  • Save cevaris/f10a94dc83cb091d5f6b to your computer and use it in GitHub Desktop.
Save cevaris/f10a94dc83cb091d5f6b to your computer and use it in GitHub Desktop.
curl -X "GET" "https://api.twitter.com/1.1/search/tweets.json?q=chicken" \
-H "Authorization: Bearer MY_BEARER_TOKEN"
CONSUMER_KEY=YOUR_CONSUMER_KEY
CONSUMER_SECRET=YOUR_CONSUMER_SECRET
BASIC_AUTH=$(echo -n "$CONSUMER_KEY:$CONSUMER_SECRET" | base64)
curl -X "POST" "https://api.twitter.com/oauth2/token" \
-H "Authorization: Basic $BASIC_AUTH" \
--data-urlencode "grant_type=client_credentials"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment