Kentico Rest on Azure

Gideon Gontor asked on January 24, 2019 12:36

I configured my website on azure web app for rest call. I am getting 403 error access denied. It works on my local Development machine.

Correct Answer

David te Kloese answered on January 24, 2019 15:29

If you check the article I linked you can also do "Hash parameter authentication"

This is however less save and as the article warns you about:

Only use hash parameter authentication for loading data that you want to make publicly available. REST requests with hash authentication can be executed by anyone who obtains the URL (for example by intercepting the web request).

To get the authentication hash for REST requests:

  1. Prepare the URL of your REST request in advance.
  2. Open the Settings application.
  3. Select the Integration -> REST category.
  4. Click Generate authentication hash.
  5. Enter the full absolute URL of the REST request, including the protocol, website domain name, virtual directory, REST path, and query string parameters. For example: http://mywebsite.com/rest/content/currentsite/en-us/all/news?format=json
  6. Click Authenticate.
1 votesVote for this answer Unmark Correct answer

Recent Answers


David te Kloese answered on January 24, 2019 14:54

Are you sure the Authentication key you use is correct and to an active user on that instance?

You need to specify the username and password through the Authorization line in the HTTP header of every REST request. The header line consists of:

  • The authentication type (Basic)
  • The username and password connected by a colon (username:password), encoded using the Base64 algorithm

see more info at https://docs.kentico.com/k12/integrating-3rd-party-systems/kentico-rest-service/authenticating-rest-requests

0 votesVote for this answer Mark as a Correct answer

Gideon Gontor answered on January 24, 2019 15:23

Hi David

Thanks for responding to my enquiry, I observed that azure web app does not support basic authentication, I don't know there is a way round it.

0 votesVote for this answer Mark as a Correct answer

Gideon Gontor answered on January 24, 2019 15:47 (last edited on January 24, 2019 16:07)

Hi David

Your right I must have done something wrong earlier,it worked.

Thanks

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.