首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >.net 使用滑动验证码为什么一直报签名错误?

.net 使用滑动验证码为什么一直报签名错误?

提问于 2020-03-23 22:18:49
回答 0关注 0查看 202

内容如题。以下是代码:

代码语言:js
复制
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());
            }

回答

和开发者交流更多问题细节吧,去 写回答
相关文章

相似问题

相关问答用户
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档