https://github.com/voximplant/apiclient-go
Voximplant Management API Go client library
https://github.com/voximplant/apiclient-go
management-api voximplant
Last synced: 12 days ago
JSON representation
Voximplant Management API Go client library
- Host: GitHub
- URL: https://github.com/voximplant/apiclient-go
- Owner: voximplant
- License: apache-2.0
- Created: 2019-06-06T14:06:33.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2025-04-21T09:51:36.000Z (30 days ago)
- Last Synced: 2025-05-08T22:57:12.568Z (12 days ago)
- Topics: management-api, voximplant
- Language: Go
- Homepage:
- Size: 626 KB
- Stars: 12
- Watchers: 4
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Voximplant API client library
#### Version 2.1.0
## Prerequisites
In order to use Voximplant SDK for the Go programming language, you need the following:
1. A developer account. If you don't have one, [sign up here](https://voximplant.com/sign-up/).
2. A private API key. There are 2 options to obtain it:
1. Either generate it in the [Voximplant Control panel](https://manage.voximplant.com/settings/service_accounts)
1. Or call the [CreateKey](https://voximplant.com/docs/references/httpapi/managing_role_system#createkey) HTTP API
method with the
specified [authentication parameters](https://voximplant.com/docs/references/httpapi/auth_parameters). You'll
receive a response with the __result__ field in it. Save the __result__ value in a file (since we don't store the
keys, save it securely on your side).## Getting started
* The best way to start is to use `go get` to add the SDK to your Go Workspace or application using Go modules:
```sh
go get github.com/voximplant/apiclient-go
```* Without Go Modules (or in a GOPATH with Go 1.11 or 1.12), use `go get` with the `/...` suffix to retrieve all of the
SDK's dependencies:```sh
go get github.com/voximplant/apiclient-go/...
```### Example
This example shows how you can use the API client.
```go
package mainimport (
"fmt"
"github.com/voximplant/apiclient-go/config"
"github.com/voximplant/apiclient-go/methods"
)func main() {
voxConfig := config.NewConfig().WithEndpoint("https://api.voximplant.com/platform_api/").WithKeyPath("vox_key_jwt.json")
// Create a Voximplant client using the Config value
client, err := methods.NewClient(voxConfig)
if err != nil {
panic("failed to create client, " + err.Error())
}
// Build input parameters
params := methods.GetSubscriptionPriceParams{SubscriptionTemplateType: "SIP_REGISTRATION"}
// Send the request and get the response or error back
res, verr, err := client.Accounts.GetSubscriptionPrice(params)fmt.Println(res, verr, err)
}
```