Before you begin
In order to start using Syncplicity API, you need to meet the following prerequisite:
Before you start developing against the APIs, you need to sign up for a developer account. Use this link follow the instructions to get started with your Syncplicity account.
The Developer Portal will prompt you to create a password for your sandbox account. Once you’re logged in, you’ll have access to the REST API documentation and examples.
The sandbox account is a fully functional Syncplicity Enterprise Account, allowing you to manage users, set Policies, and access all the features and administration options of Syncplicity. The owner of this account will be named using your email address but with a "-apidev" added before the at sign (@).
GETTING YOUR OAUTH TOKENS
Once you have your account set up you will need to create an App in the Syncplicity Dev Account. Then you will need 3 main things. AppKey and AppSecret from your developer account. The Application Token from your sandbox account.
- Application Token
First, get the base64 encoded OAuth basic token for your App -
- The Developer Portal (https://developer.syncplicity.com), go to "My Apps” and get the “App Key” and “App Secret”
- If you don’t have them here, create a new App and it’ll generate them for you
- To use the Key and Secret, you need to base64 encode them together. There are a couple of ways to do this:
- Go to https://www.base64encode.org and paste in “<App Key>:<App Secret>”
- From a Linux Shell, type in:
echo -n "<App Key>:<App Secret>" | base64
- Either way, save this base64 encoded string somewhere safe!
- NOTE: don't forget to include the colon (:) between the Key and Secret when performing the above.
Second, get the Syncplicity Application Token from your sandbox account -
- Login to your Syncplicity Admin Account (https://my.syncplicity.com), go to your Account tab, and find the “Application Token” under your Profile info.
- If it’s not there, click the "Create” link to create one
- Save this token string somewhere safe!
Now you’ve got the two parts you need to use the APIs. To get logged in with OAuth, perform the following:
- Make a POST request to https://api.syncplicity.com/oauth/token with the following:
- Header = 'Authorization: Basic <base64 string from above>'
- Header = 'Sync-App-Token: <Application Token from above>'
- Data = 'grant_type=client_credentials'
- You’ll get back a bunch of stuff, including the Access Token and Company ID, which you'll need for your other API calls.
PLEASE NOTE! Depending on where you are located you might be using the US version or the EU version of the API’s.
If you are using the EU version you will need to add .eu to your endpoints like this.
Otherwise it will be this
If you’re a cURL person, the above translates to:
curl -sS -X POST https://api.syncplicity.com/oauth/token -H
'Authorization: Basic <base64string>' -H 'Sync-App-Token: <TokenString>'
What you’ll get back is something like this:
Now you’ve got the Company ID and, more importantly, the Access Token which is what you’ll need for all your API calls.
Next step, go play in the Developer Portal!