Search code examples
archilogic3d.io

Autofurnishing.furnish method 400 bad request


I'm trying to run examples-browser/staging/stage-scene-structure in local server, i've created publishableApiKey and added it in the io3d.config. On selection of a area console displays following error

HomeStaging error: You are not authorized to access this method. Please use your API key to use this method or get a free API key at 3d.io

How to resole this?

Note: I'm using free quotas

Thanks


Solution

  • I'm sorry to hear you're having issues. The first thing that comes to mind is that the allowed domains associated with your publishable API key are incorrect.

    When setting the domains you have to set them without quotes, i.e. only the domains separated by spaces:

    localhost *.3d.io mypage.com
    

    The solution for now while the leading/trailing quotes are not ignored by the library is to generate a new API key with the correct list of domains.

    When it comes to running the application locally, all you need to do is to follow the installation guidelines here

    git clone https://github.com/archilogic-com/3dio-js.git ; cd ./3dio-js
    npm install rollup -g ; npm install lite-server -g
    npm install
    

    Now you can edit the index.html file, adding your publishable API key to config. Then you can go back to terminal and start the server:

    npm start
    

    This will automatically open the examples in the browser:

    enter image description here

    where you can click through to the example you'd like to test out:

    enter image description here