Created
June 26, 2013 14:56
-
-
Save horte/5868046 to your computer and use it in GitHub Desktop.
Saplo PHP Example
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 | |
include "saplo4php-2.0.php"; //downloaded from https://github.com/saplo/saplo4php-2.0 | |
//When creating the SaploAPI object ($client) you will automatically be authenticated. | |
$client = new SaploAPI("APIKEY", "SECRETKEY"); | |
//You can also get your Access Token | |
echo $client->getAccessToken(); | |
//Prints | |
/* | |
JSON-Request: {"method":"auth.accessToken","params":{"api_key":"APIKEY","secret_key":"SECRETKEY"},"id":0,"jsonrpc":"2.0"} JSON-Response: {"id":0,"result":{"access_token":"AT4837791421210358754"},"jsonrpc":"2.0"} AT4837791421210358754 | |
*/ | |
//Running on PHP Version 5.4.11 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment