وردپرس
403 error
Replies: 0
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?
این خبر را در ایران وب سازان مرجع وب و فناوری دنبال کنید
مشاهده پاسخ های این مطلب
———————————————
این مطلب از سایت انجمن وردپرس گردآوری شده است و کلیه حقوق مطلق به انجمن وردپرس می باشد در صورت مغایرت و یا بروز مشکل اطلاع دهید تا حذف گردد
منبع: انجمن وردپرس