{"id":18057533,"date":"2024-10-07T08:13:07","date_gmt":"2024-10-07T08:13:07","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/403-error-148\/"},"modified":"2024-10-07T08:13:07","modified_gmt":"2024-10-07T08:13:07","slug":"403-error-148","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/403-error-148\/","title":{"rendered":"403 error"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Hello,<br \/><br \/>After a year without probles I get an 403 error when trying to activate a license. I didn&#8217;t change any code allthought plugins have been updated.<br \/>Activation still works when i use the url in the browser and log in with the consumer key and the consumer secret<br \/><br \/>I use the following code: <br \/><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">im client As HttpClient = New HttpClient()<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>        ' Set the base address of the API<br \/>        client.BaseAddress = New Uri(\"https:\/\/financialdecisionsupport.nl\/wp-json\/dlm\/v1\/\")<br \/>        ' Set the authorization header<br \/>        client.DefaultRequestHeaders.Authorization =<br \/>            New AuthenticationHeaderValue(\"Basic\",<br \/>                                      Convert.ToBase64String(Encoding.ASCII.GetBytes(\"ck_xxxxx:cs_yyyyy\")))<br \/>        ' Set the security protocol explicitly<br \/>        ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12<br \/>        ' Send the GET request<br \/>        Dim response As HttpResponseMessage = client.GetAsync(\"licenses\/activate\/\" &amp; lsLicenseKey).Result<br \/>        ' Check if the request was successful<br \/>        If response.IsSuccessStatusCode Then<br \/><br \/>As a result I get <br \/><br \/>-\t\tresponse\t{StatusCode: 403, ReasonPhrase: 'Forbidden', Version: 1.1, Content: System.Net.Http.StreamContent, Headers:<br \/>{<br \/>  Cache-Control: no-cache<br \/>  Content-Length: 93<br \/>  Content-Type: text\/html<br \/>}}\tSystem.Net.Http.HttpResponseMessage<br \/>+\t\tContent\t{System.Net.Http.StreamContent}\tSystem.Net.Http.HttpContent {System.Net.Http.StreamContent}<br \/>+\t\tHeaders\t{Cache-Control: no-cache<br \/>}\tSystem.Net.Http.Headers.HttpResponseHeaders<br \/>\t\tIsSuccessStatusCode\tFalse\tBoolean<br \/>\t\tReasonPhrase\t\"Forbidden\"\tString<br \/>+\t\tRequestMessage\t{Method: GET, RequestUri: 'https:\/\/financialdecisionsupport.nl\/wp-json\/dlm\/v1\/licenses\/activate\/TCCSCC-7G4U-JX5B-LKJLJKJL', Version: 1.1, Content: &lt;null&gt;, Headers:<br \/>{<br \/>  Authorization: Basic xxxxyyyyyyy<br \/>}}\tSystem.Net.Http.HttpRequestMessage<br \/>\t\tStatusCode\tForbidden {403}\tSystem.Net.HttpStatusCode<br \/>+\t\tVersion\t{1.1}\tSystem.Version<br \/>+\t\tShared members\t\t<br \/>+\t\tNon-Public members\t<br \/><br \/><br \/>Any idea how to solve this?\t<br \/><\/code><\/pre>\n","protected":false},"template":"","class_list":["post-18057533","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/18057533","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/18057533\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=18057533"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}