Skip to content

Instantly share code, notes, and snippets.

@shevron
Created October 23, 2016 06:20
Show Gist options
  • Save shevron/10d15f6c838ab02ca69e6d8ffe2c1f04 to your computer and use it in GitHub Desktop.
Save shevron/10d15f6c838ab02ca69e6d8ffe2c1f04 to your computer and use it in GitHub Desktop.
Shoppimon API Examples (bash / curl / jq)
# The following example requires `jq` to parse JSON
CLIENT_ID=abcdef12345678s
CLIENT_SECRET=0123456789abcdef0123456789abcdef
BEARER_TOKEN=$(curl -s -X POST https://api.shoppimon.com/oauth \
-H "Content-Type: application/json" \
-d '{"grant_type":"client_credentials","client_id":"'$CLIENT_ID'","client_secret":"'$CLIENT_SECRET'"}' |\
jq -rM '.access_token')
export BEARER_TOKEN
echo "Bearer token: $BEARER_TOKEN"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment