<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>Cannot access new REST APIs in 7.2 using browser</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=114356338" />
  <subtitle>Cannot access new REST APIs in 7.2 using browser</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=114356338</id>
  <updated>2026-04-07T05:37:31Z</updated>
  <dc:date>2026-04-07T05:37:31Z</dc:date>
  <entry>
    <title>RE: Cannot access new REST APIs in 7.2 using browser</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121177572" />
    <author>
      <name>Abdul Kareem</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121177572</id>
    <updated>2021-10-01T13:30:08Z</updated>
    <published>2021-10-01T13:29:38Z</published>
    <summary type="html">&lt;p&gt;Please refer this. https://learn.liferay.com/dxp/latest/en/headless-delivery/consuming-apis/making-unauthenticated-requests.html&lt;/p&gt;
&lt;p&gt;you need to create a service access policy.&lt;/p&gt;</summary>
    <dc:creator>Abdul Kareem</dc:creator>
    <dc:date>2021-10-01T13:29:38Z</dc:date>
  </entry>
  <entry>
    <title>RE: Cannot access new REST APIs in 7.2 using browser</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120502799" />
    <author>
      <name>Victor Manea</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120502799</id>
    <updated>2020-12-12T18:17:06Z</updated>
    <published>2020-12-12T18:17:06Z</published>
    <summary type="html">&lt;p&gt;
  &lt;strong&gt;Solution 1&lt;/strong&gt;: As per @MohammedYasin's response, you
  should add the &amp;quot;Authorization&amp;quot; header as in the example
  bellow (I'm using Postman):&lt;/p&gt;
&lt;p&gt;
  &lt;img src="/documents/14/0/basic_auth.png/3f3f18d3-5afe-2b75-09ea-fbedc24d1726?t=1607796751515&amp;amp;imagePreview=1" /&gt;&lt;/p&gt;
&lt;p&gt;
  &lt;strong&gt;Solution 2&lt;/strong&gt;: disable the authentication for your
  module. For this, follow
  the https://help.liferay.com/hc/en-us/articles/360021024071-Making-Authenticated-Requests-
  details. Keep in mind that their example
  (com.liferay.headless.delivery.internal.jaxrs.application.HeadlessDeliveryApplication-default.config)
  is for the component from their example. The real name of the config
  file should be in regard with what you have defined. For example, if
  your Class is PdfGeneratorApplication and is
  in PdfGenerator.application package, the your config file should be
  named PdfGenerator.application.PdfGeneratorApplication-default.config
  with the following content:&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-java"&gt;oauth2.scopechecker.type=&amp;quot;none&amp;quot;
auth.verifier.auth.verifier.BasicAuthHeaderAuthVerifier.urls.includes=&amp;quot;*&amp;quot;
auth.verifier.auth.verifier.OAuth2RestAuthVerifier.urls.includes=&amp;quot;*&amp;quot;
auth.verifier.guest.allowed=&amp;quot;true&amp;quot;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;</summary>
    <dc:creator>Victor Manea</dc:creator>
    <dc:date>2020-12-12T18:17:06Z</dc:date>
  </entry>
  <entry>
    <title>RE: Cannot access new REST APIs in 7.2 using browser</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114456033" />
    <author>
      <name>Mohammed Yasin</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114456033</id>
    <updated>2019-07-26T11:50:34Z</updated>
    <published>2019-07-26T11:50:34Z</published>
    <summary type="html">Hi, &lt;br /&gt;  This is because all the services are protected under Basic access authentication, if your using postman or rest client set the Basic Auth in Header  or if you want to access from browser you need to add com.liferay.headless.delivery.internal.resource.v1_0.OpenAPIResourceImpl#getOpenAPI in SYSTEM_DEFAULT (Service Access Policy)</summary>
    <dc:creator>Mohammed Yasin</dc:creator>
    <dc:date>2019-07-26T11:50:34Z</dc:date>
  </entry>
  <entry>
    <title>Cannot access new REST APIs in 7.2 using browser</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114356337" />
    <author>
      <name>Michael Freeman</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114356337</id>
    <updated>2021-10-04T17:32:59Z</updated>
    <published>2019-07-19T12:43:38Z</published>
    <summary type="html">&lt;p&gt;I am unable to access the new REST Open API in DXP 7.2 from a browser
  window.&lt;br /&gt; If i use a REST client tool, set up BASIC AUTH, and hit
  the URL &lt;a
    href="http://localhost:8080/o/headless-delivery/v1.0/openapi.json"&gt;http://localhost:8080/o/headless-delivery/v1.0/openapi.json
  &lt;/a&gt;everything works fine and as expected.&lt;br /&gt; If however i try to
  hit that exact same URL from the address bar of a logged in browser
  session I receive:&lt;br /&gt;
  &lt;strong&gt;Access denied to com.liferay.headless.delivery.internal.resource.v1_0.OpenAPIResourceImpl#getOpenAPI&lt;/strong&gt;
  &lt;br /&gt; Am I doing something wrong?&lt;/p&gt;</summary>
    <dc:creator>Michael Freeman</dc:creator>
    <dc:date>2019-07-19T12:43:38Z</dc:date>
  </entry>
</feed>
