我正在编写一个程序来检索我的所有Apple帐户信息,页面是 https://secure.store.apple.com/shop/account/setup/start
我发现我应该将三个参数[accountName],[密码],[rememberMe]发布到https://idmsa.apple.com/appleauth/auth/signin才能登录。但是,我得到500错误状态。我可以通过我的浏览器访问该页面(获得200状态),那么我的错误是什么?感谢。
我在postman中调试:
POST:https://idmsa.apple.com/appleauth/auth/signin
参数:
[accountName,MyAppleID]
[密码,MyPassword]
[rememberMe,false]
和我的C#代码:(使用RestSharp)
var restClient = new RestClient();
restClient.BaseUrl = new Uri("https://idmsa.apple.com/appleauth/auth/signin");
var request = new RestRequest(Method.POST);
request.AddParameter("accountName", MyAppleID);
request.AddParameter("password", MyPassword);
request.AddParameter("rememberMe", "false");
IRestResponse response = restClient.Execute(request);
Console.WriteLine(response.StatusCode); // show "InternalServerError"