Last active
February 29, 2016 14:07
-
-
Save fatmatto/4d50ee51c73c7883a4f9 to your computer and use it in GitHub Desktop.
Generate a marketcloud token with curl
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
#!/bin/bash | |
timestamp=$(date +%s) | |
hashedSecret=$(echo -n "YOUR_SECRET_KEY$timestamp" | openssl sha256 -binary | base64) | |
curl -XPOST -H "Content-Type: application/json" -d "{\"publicKey\" : \"YOUR_PUBLIC_KEY\",\"secretKey\" : \"${hashedSecret}\",\"timestamp\" : ${timestamp}}" http://api.marketcloud.it/v0/tokens |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment