私は得ています
{"type":"bad_request","message":"Unexpected token }"}
更新Webhooks
エンドポイントから。これをasp.netに実装しようとしています。私のコードブロックは次のとおりです。
var httpCLient = new HttpClient();
httpCLient.BaseAddress = new Uri("https://connect.squareup.com");
AuthenticationHeaderValue auth = new AuthenticationHeaderValue("Bearer", "access_token");
httpCLient.DefaultRequestHeaders.Authorization = auth;
httpCLient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
HttpContent content = new StringContent("{\"PAYMENT_UPDATED\"}", System.Text.Encoding.UTF8, "application/json");
Task<HttpResponseMessage> httpResponse = httpCLient.PutAsync("/v1/me/webhooks", content);
if (httpResponse.Result.StatusCode == HttpStatusCode.OK)
{
}
誰でもこれで私を助けることができますか?Google で接続 API 実装ガイド/例を既に検索しましたが、運がありません。