Main Content

Magnolia Community Forums: Development: Authorization error in Magnolia 5.3 rest api

  • revathy.varadhan
    Full name: Revathy Varadhan
    Posts: 9
    Last post: Jul 2, 2015 8:57:18 AM
    Authorization error in Magnolia 5.3 rest api
    #1 by revathy.varadhan on Jul 2, 2015 8:57:18 AM

    I am trying to access the contents exposed as REST api in a angular front end.

    XMLHttpRequest cannot load http://localhost:8050/magnoliaAuthor/.rest/nodes/v1/*********/******?depth=3. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8045' is therefore not allowed access. The response had HTTP status code 403.

    I have given authorization as superuser/superuser and content as application/json

  • neophy7e
    Full name: Khaled Bentoumi
    Posts: 2
    Last post: Oct 27, 2015 7:22:25 PM
    Registered on: Sep 25, 2015
    Re: Authorization error in Magnolia 5.3 rest api
    #2 by neophy7e on Sep 25, 2015 5:43:40 PM

    Having the same issue here, is there is anyway to configure magnolia to accept request from specified domain ?

  • ahietala
    Full name: Antti Hietala
    Posts: 343
    Last post: Nov 21, 2017 1:46:37 PM
    Re: Authorization error in Magnolia 5.3 rest api
    #3 by ahietala on Sep 28, 2015 3:19:51 PM

    Revathy / Khaled,

    You are getting a 403 error so check REST security first before you go about setting a CORS header.

    - Are you accessing the endpoint as anonymous? The anonymous account is specifically denied access to REST endpoints.
    - If using another account, make sure the account has the "rest" role assigned to it.
    - Make sure the "rest" role has GET and POST access to your workspace. The edge is masked in your example so I can't tell. Only the "website" workspace is granted by default.


  • lfischer
    Full name: Lars Fischer
    Posts: 41
    Last post: Sep 27, 2016 11:27:21 AM
    Re: Authorization error in Magnolia 5.3 rest api
    #4 by lfischer on Dec 22, 2015 1:50:52 PM

    For settings the CORS response headers you can create a filter in Magnolia that adds the needed settings to the response object.

  • czimmermann
    Full name: Christopher Zimmermann
    Posts: 65
    Last post: Mar 28, 2017 11:27:20 AM
    Re: Authorization error in Magnolia 5.3 rest api
    #5 by czimmermann on Mar 25, 2017 9:52:44 AM

    Late to the game - but for the future seekers - this module enables CORS in Magnolia:

You don't have the permission to post on this thread

Sign in

To login on this forum, you can use your Magnolia Forge, Support or Partner account, or, below, your Google, Yahoo! or OpenID account. If you have trouble logging in, or any other sort of issue, please let us know in the Meta forum, on the user-list, or simply by email at forum-admin at magnolia-cms dot com.

* Required

... or sign in with:

  • icon http://{your-openid-url}
  • icon
  • icon