Syncplicity Support

Search our knowledgebase to get the help you need, today

Follow

Getting Started with Syncplicity APIs

 

Before you begin 

In order to start using Syncplicity API, you need to meet the following prerequisite:

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.

  • AppKey
  • AppSecret
  • 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.
https://api.eu.syncplicity.com
Otherwise it will be this
https://api.syncplicity.com

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>'
-d 'grant_type=client_credentials'

What you’ll get back is something like this:

{
"issued_at":"1457653432956”,
"scope":"readwrite read”,
"user_company_id":"8c1212c9-1e54-4ce1-b9fd-6f826f2582c3”,
"expires_in":"5099”,
"user_email":”",
"organization_id":"0”,
"token_type":"BearerToken”,
"client_id":"WdVRG3ak9CS717BTgZiLZMxYAFTW2sfW”,
"access_token":"OJnEotf5AhWpM3qsumDG3O8YpBIW”,
"organization_name":"syncplicity”,
"application_id":"58497e23-b3cb-4f17-a6e7-e25cca808214”
}

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!

Powered by Zendesk