package main
import (
"fmt"
"digisign"
)
func main() {
session := digisign.CreateSession("ds_123456789")
}Docs
Go
Go
Learn how to create your first sigature request using the DigiSign Go SDK.
Prerequisites
To get the most out of this guide, you’ll need to:
Install
Get the DigiSign Go SDK.
go get https://github.com/digisign/digisigngosdkAuthenticate
The DigiSign API requires authentication via an API Key. Learn More.
Call CreateSession to authenticate. Each session expires every 6 minutes.
Transform a template to a Request
The easiest way to create a request is by using the Transform method.
package main
import (
"fmt"
"digisign"
)
func main() {
session := digisign.CreateSession("ds_123456789")
workspaceID := "ws_1234567890"
data := map[string]interface{}{
"recipients": []map[string]interface{}{
{
"id": "tmp-abcdefg123456789",
"name": "Jessica Lee",
"email": "jessicalee@example.com",
},
},
}
err := session.Requests.Workspace(workspaceID).Transform(data)
if err != nil {
fmt.Println(err)
}
}Recipients ID must match a corresponding alias ID from the selected template.
Try it yourself
Was this page helpful?