Prerequisites
- You have installed Go 1.18 or newer.
- Follow the instructions in Preparation for development environment to set up your Cobo account and create your organization. If an organization has already been set up, ask your organization admin to invite you to join the organization.
- Follow the instructions in Send your first request to generate an API key and an API secret, and register the API key on Cobo Portal.
Install the SDK
- Create a Go project if you have not already done so.
-
In the
go.modfile of your project, add the following line:Replace {VERSION} with the lastest version number, for example,v1.2.0. Obtain the latest version number from the GitHub repository. -
Run the
go mod tidycommand in a terminal or in your IDE to install the dependencies. -
In your
main.gofile, import the WaaS SDK as follows:
Configure API key and HTTP host
In the main function in yourmain.go file, configure the HTTP host by selecting the environment and provide your API secret.
The following code snippet shows the configuration for the development environment.
