内容如题。以下是代码:
try
{
var cred = new Credential
{
SecretId = "xxx",
SecretKey = "xxx"
};
var httpProfile = new HttpProfile
{
Endpoint = "captcha.tencentcloudapi.com"
};
var clientProfile = new ClientProfile
{
HttpProfile = httpProfile
};
string strParams = "{\"CaptchaType\":9,\"Ticket\":\"t02q8BvXw57fktKYywZnx4p_RyGiIhOYAhKMWQGAKUOiF7ULk3ZolMM-Xksm0xWQo1VIG4xhs5V9qEwSpOyuQQv_7brDbEfvIBjWhm4MPVFsSiHgYzRDNscmA**\",\"UserIp\":\"127.0.0.1\",\"Randstr\":\"@aNa\",\"CaptchaAppId\":xx,\"AppSecretKey\":\"xx**\"}";
var client = new CaptchaClient(cred, "ap-shanghai", clientProfile);
var req = AbstractModel.FromJsonString<DescribeCaptchaResultRequest>(strParams);
var resp = client.DescribeCaptchaResult(req).ConfigureAwait(false).GetAwaiter().GetResult();
var res = AbstractModel.ToJsonString(resp);
Console.WriteLine(res);
}
catch (TencentCloudSDKException ex)
{
Console.WriteLine(ex.ToString());
}
相似问题