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
# Thanks to Khuong Phan - duykhuongkid@gmail.com - for providing this example. | |
# Provided public and private keys | |
$publicKey = 'xxxxxxxxxxx'; | |
$privateKey = 'yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy'; | |
# Unix timestamp | |
$unixTime=[int][double]::Parse($(Get-Date -date (Get-Date).ToUniversalTime()-uformat %s)) | |
# Capture the time and package with public key |
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
<?php | |
// Set timezone to UTC | |
date_default_timezone_set('UTC'); | |
// Provided public and private keys | |
$publicKey = 'put-your-public-key'; | |
$privateKey = 'put-your-private-key-here'; | |
// Capture the time and package with the public key |
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
/** | |
* Place this in your Pre-request Script section of your Postman calls to the RapidSpike API. | |
* | |
* Then add this query string to your request URLs: `?public_key={{publicKey}}&time={{unixTime}}&signature={{signature}}` | |
*/ | |
var publicKey = 'put-your-public-key'; | |
var privateKey = 'put-your-private-key-here'; | |
var unixTime = Math.floor(Date.now() / 1000); |
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
<?php | |
// Set timezone to UTC | |
date_default_timezone_set('UTC'); | |
function rapidspike_api_call($uri, $public_key, $private_key) | |
{ | |
$url = sprintf('https://api.rapidspike.com/v1%s?', $uri); | |
$now = time(); |
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
#!/usr/bin/python | |
import hashlib | |
import hmac | |
import base64 | |
import time | |
import requests | |
import logging | |
logger = logging.getLogger(__name__) |