Skip to content

Instantly share code, notes, and snippets.

@WesleyBatista
Created December 6, 2017 20:39
Show Gist options
  • Save WesleyBatista/2eaf3327aa416595248d7ffb9bae8153 to your computer and use it in GitHub Desktop.
Save WesleyBatista/2eaf3327aa416595248d7ffb9bae8153 to your computer and use it in GitHub Desktop.
# set the vars
CLIENT_ID=xxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
CLIENT_SECRET=xxxxxxxxxxxxxxxxxxx
EMAIL=me@mycompany.com
PASSWORD=xxxxxxxxXXXXXXXXXXXXXXXXXXXXXXXX
INSTANCE_URL=https://xxxx.salesforce.com
# request the token
curl -d "grant_type=password&client_id=$CLIENT_ID&client_secret=$CLIENT_SECRET&username=$EMAIL&password=$PASSWORD" $INSTANCE_URL/services/oauth2/token
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment