<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Alfresco Cloud API call via AJAX - 403 forbidden in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/alfresco-cloud-api-call-via-ajax-403-forbidden/m-p/279229#M232359</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;we would like to create a simple Javascript application that uses the Alfresco Cloud API.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Testing the API with a REST client works fine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When we use a call like this using jQuery&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;$.ajax({&lt;BR /&gt;&amp;nbsp; type:"GET",&lt;BR /&gt;&amp;nbsp; url: "&lt;A href="https://api.alfresco.com/company.com/public/cmis/versions/1.1/atom/children?id=f3a0dee7-41d3-4fa1-9b7e-bd8c711ec792&amp;amp;orderby=cmis:name" rel="nofollow noopener noreferrer"&gt;https://api.alfresco.com/company.com/public/cmis/versions/1.1/atom/children?id=f3a0dee7-41d3-4fa1-9b7e-bd8c711ec792&amp;amp;orderby=cmis:name&lt;/A&gt; ASC",&lt;BR /&gt;&amp;nbsp; crossDomain: "true",&lt;BR /&gt;&amp;nbsp; beforeSend: function (request)&lt;BR /&gt;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; request.setRequestHeader("Authorization", "Bearer &amp;lt;accessToken)");&lt;BR /&gt;&amp;nbsp; }&lt;BR /&gt;})&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;we get 403 forbidden. If we test with Google Chrome and web-security-disabled it works fine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This seems to be due to the same origin policy. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Are such calls allowed on Alfresco side (I guess they are)?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Is the browser blocking such requests?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there a way to overcome this problem?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I thought the REST based API should make the creation lightweight clients easier.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Arno&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 Dec 2013 11:47:57 GMT</pubDate>
    <dc:creator>haa05</dc:creator>
    <dc:date>2013-12-09T11:47:57Z</dc:date>
    <item>
      <title>Alfresco Cloud API call via AJAX - 403 forbidden</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/alfresco-cloud-api-call-via-ajax-403-forbidden/m-p/279229#M232359</link>
      <description>Hi,we would like to create a simple Javascript application that uses the Alfresco Cloud API.Testing the API with a REST client works fine.When we use a call like this using jQuery$.ajax({&amp;nbsp; type:"GET",&amp;nbsp; url: "https://api.alfresco.com/company.com/public/cmis/versions/1.1/atom/children?id=f3a0dee7-41d3</description>
      <pubDate>Mon, 09 Dec 2013 11:47:57 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/alfresco-cloud-api-call-via-ajax-403-forbidden/m-p/279229#M232359</guid>
      <dc:creator>haa05</dc:creator>
      <dc:date>2013-12-09T11:47:57Z</dc:date>
    </item>
    <item>
      <title>Re: Alfresco Cloud API call via AJAX - 403 forbidden</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/alfresco-cloud-api-call-via-ajax-403-forbidden/m-p/279230#M232360</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You appear to be attempting to use CMIS 1.1 to work with Alfresco in the cloud. Unfortunately, CMIS 1.1 is not yet supported in Alfresco in the cloud.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can you please change the URL from versions/1.1 to versions/1.0 and try again?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jeff&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Dec 2013 22:04:49 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/alfresco-cloud-api-call-via-ajax-403-forbidden/m-p/279230#M232360</guid>
      <dc:creator>jpotts</dc:creator>
      <dc:date>2013-12-10T22:04:49Z</dc:date>
    </item>
    <item>
      <title>Re: Alfresco Cloud API call via AJAX - 403 forbidden</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/alfresco-cloud-api-call-via-ajax-403-forbidden/m-p/279231#M232361</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the hint Jeff. Changing to version 1.0 makes no difference - same error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Should this work by design? &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I thought that it's sufficient that the server allows cross-domain request and Alfresco Cloud is setup that way.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Arno&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Dec 2013 06:11:43 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/alfresco-cloud-api-call-via-ajax-403-forbidden/m-p/279231#M232361</guid>
      <dc:creator>haa05</dc:creator>
      <dc:date>2013-12-11T06:11:43Z</dc:date>
    </item>
    <item>
      <title>Re: Alfresco Cloud API call via AJAX - 403 forbidden</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/alfresco-cloud-api-call-via-ajax-403-forbidden/m-p/279232#M232362</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I can confirm that this call works in a browser-based HTTP client as well as on the command line with curl but it does not work with JQuery. Unfortunately, I do not think it is possible to specify the authorization header while also making a cross-domain request.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jeff&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Dec 2013 16:45:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/alfresco-cloud-api-call-via-ajax-403-forbidden/m-p/279232#M232362</guid>
      <dc:creator>jpotts</dc:creator>
      <dc:date>2013-12-11T16:45:10Z</dc:date>
    </item>
  </channel>
</rss>

