Overview
The Synq API is available for developers to manage certain functionalities using custom workflows. Synq exposes its API as gRPC services. This means that the API are as easy to use as calling functions from your code. To use the API, you need to do the following.- Clone protos from our github repository and generate the client code in the language of your choice.
- Generate an access token and use it to connect to Synq API.
- Initialize clients and call functions in your code.
Client Code
The simplest way to use Synq API is to use the SDKs from ourbuf
repository. Use select the language of your choice and follow the instructions to add the Synq API to your project.
Generating client code
If you prefer to, the client code can be generated from the protos available at our github repository.Go
You will need the following plugins to generate golang code from the protos.<synq_api_codebase>
to generate the code in golang.
./gen
folder. You can change the location or find more options here on how to use the protoc
generator to suit your project’s needs.
Python
You will need the following tools to generate python code from the protos.<synq_api_codebase>
to generate the code in golang.
./gen
folder. You can change the location to suit your project’s needs.
Fetching Access Token
You need a valid access token to communicate with the Synq servers. To generate the access token, you need client credentials. You can generate an client credentials (CLIENT_ID
and CLIENT_SECRET
) from the Synq application. The credentials are scoped so make sure to select the one best suited to execute the RPCs that you wish to.
You can now fetch the token source by making the following POST
call to our OAuth2 server.
<access_token>
thus fetched is a valid JWT token which should be passed on to the calls made to Synq API.
Examples
The language specific examples to use Synq APIs can be found here.Troubleshooting
-
If you experience a considerable slowness in connecting to the gRPC services, please flush your DNS cache. This is specially relevant if you are behind a VPN.