403 error
-
Hello,
After a year without probles I get an 403 error when trying to activate a license. I didn’t change any code allthought plugins have been updated.
Activation still works when i use the url in the browser and log in with the consumer key and the consumer secret
I use the following code:im client As HttpClient = New HttpClient()
' Set the base address of the API
client.BaseAddress = New Uri("https://financialdecisionsupport.nl/wp-json/dlm/v1/")
' Set the authorization header
client.DefaultRequestHeaders.Authorization =
New AuthenticationHeaderValue("Basic",
Convert.ToBase64String(Encoding.ASCII.GetBytes("ck_xxxxx:cs_yyyyy")))
' Set the security protocol explicitly
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12
' Send the GET request
Dim response As HttpResponseMessage = client.GetAsync("licenses/activate/" & lsLicenseKey).Result
' Check if the request was successful
If response.IsSuccessStatusCode Then
As a result I get
- response {StatusCode: 403, ReasonPhrase: 'Forbidden', Version: 1.1, Content: System.Net.Http.StreamContent, Headers:
{
Cache-Control: no-cache
Content-Length: 93
Content-Type: text/html
}} System.Net.Http.HttpResponseMessage
+ Content {System.Net.Http.StreamContent} System.Net.Http.HttpContent {System.Net.Http.StreamContent}
+ Headers {Cache-Control: no-cache
} System.Net.Http.Headers.HttpResponseHeaders
IsSuccessStatusCode False Boolean
ReasonPhrase "Forbidden" String
+ RequestMessage {Method: GET, RequestUri: 'https://financialdecisionsupport.nl/wp-json/dlm/v1/licenses/activate/TCCSCC-7G4U-JX5B-LKJLJKJL', Version: 1.1, Content: <null>, Headers:
{
Authorization: Basic xxxxyyyyyyy
}} System.Net.Http.HttpRequestMessage
StatusCode Forbidden {403} System.Net.HttpStatusCode
+ Version {1.1} System.Version
+ Shared members
+ Non-Public members
Any idea how to solve this?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- You must be logged in to reply to this topic.