go get -u github.com/tencentcloud/tencentcloud-sdk-go-intl-en
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)}
文档反馈