Title: 403 error
Last modified: October 7, 2024

---

# 403 error

 *  Resolved [bamboebart](https://wordpress.org/support/users/bamboebart/)
 * (@bamboebart)
 * [1 year, 9 months ago](https://wordpress.org/support/topic/403-error-148/)
 * 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 secretI use the following code:
 * im client As HttpClient = New HttpClient()
 *     ```wp-block-code
               ' 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 ThenAs 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)

 *  Plugin Author [Darko G.](https://wordpress.org/support/users/darkog/)
 * (@darkog)
 * [1 year, 9 months ago](https://wordpress.org/support/topic/403-error-148/#post-18076473)
 * This issue was solved through email. Turns out their host started to block HTTP
   requests without known user agent. Setting up user agent on the requests sent
   to the DLM Rest API solves the issue.
 * Nothing wrong on Digital License Manager side.

Viewing 1 replies (of 1 total)

The topic ‘403 error’ is closed to new replies.

 * ![](https://ps.w.org/digital-license-manager/assets/icon-256x256.png?rev=3453242)
 * [Digital License Manager](https://wordpress.org/plugins/digital-license-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/digital-license-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/digital-license-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/digital-license-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/digital-license-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/digital-license-manager/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Darko G.](https://wordpress.org/support/users/darkog/)
 * Last activity: [1 year, 9 months ago](https://wordpress.org/support/topic/403-error-148/#post-18076473)
 * Status: resolved