Created
October 23, 2016 06:20
-
-
Save shevron/10d15f6c838ab02ca69e6d8ffe2c1f04 to your computer and use it in GitHub Desktop.
Shoppimon API Examples (bash / curl / jq)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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