faceid.tencentcloudapi.com. It also supports access using a domain name with a specified region, for example, the domain name for the Singapore region is faceid.ap-singapore. tencentcloudapi.com.faceid.ap-singaporef.tencentcloudapi.com.GOPATH set properly.go get -u github.com/tencentcloud/tencentcloud-sdk-go-intl-en
$GOPATH/src/github.com/tencentcloud.package mainimport ("fmt"cloud "github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/common""github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/common/profile"faceid "github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/faceid/v20180301")func main() {// Instantiate a client configuration object. You can specify the timeout period and other configuration itemsprof := profile.NewClientProfile()prof.HttpProfile.ReqTimeout = 60// TODO replace the SecretId and SecretKey string with the API SecretId and SecretKeycredential := cloud.NewCredential("SecretId", "SecretKey")// Instantiate the client object of the requested faceidFaceIdClient, _ := faceid.NewClient(credential, "ap-singapore", prof)// Instantiate the request object and provide necessary parametersrequest := faceid.NewGetFaceIdTokenIntlRequest()var SecureLevel = "4"request.SecureLevel = &SecureLevel// Call the Tencent Cloud API through FaceIdClientresponse, _ := FaceIdClient.GetFaceIdTokenIntl(request)// Process the Tencent Cloud API responsefmt.Println("response: ", *response.Response.SdkToken)}
피드백