Access to XMLHttpRequest been blocked by CORS policy

Tony
I encounter this error when embedding a Threekit player: Access to XMLHttpRequest at 'https://admin.threekit.com/api/cas/aac6c766-edd2-463a-889f-35ab1d24a55f?type=Node&bearer_token={TOKEN}' from origin 'http://localhost…

Comments

3 comments

  • Comment author
    Tony

    I encounter this error when embedding a Threekit player:

    Access to XMLHttpRequest at ’https://admin.threekit.com/api/cas/aac6c766-edd2-463a-889f-35ab1d24a55f?type=Node&bearer_token={TOKEN}’ from origin ’http://localhost:3000’ has been blocked by CORS policy: No ’Access-Control-Allow-Origin’ header is present on the requested resource.

    0
  • Comment author
    William Thompson

    There are two things this may be, check the docs for Embedding the Threekit Player for reference.

    1. Check that the script tag for the Threekit player matches your org environment. If you log in to Threekit at https://admin.threekit.com make sure your script tag is <script src="https://admin.threekit.com/app/js/threekit-player.js"></script>

    2. Make sure that your auth token is correct and authenticates the URL you are embedding on. For example, this token will load a player on localhost:3000 but not 127.0.0.1:3000

    0
  • Comment author
    Matthew Seeger
    Make sure that the token you are using is a Public token and the right one for your domain. If you open your browser console and run window.location.host you’ll get the host that you should use when creating your token [image]
    0

Please sign in to leave a comment.