me

Vítek Dvořák

BIM 360

My last task at Navigo3 was to find the way, how to integrate BIM into our software.
I worked with BIM-based software from Autodesk - BIM 360.

Basic structure

Our user is for example architect and he works on projectA for Customer1 and projectB for Customer2 and he wants to see his issues in Navigo.

BIM 360 demo diagram

What is…

Admin account - Autodesk account with assigned an instance of BIM 360 (Sign in)
Employee account - basic Autodesk account (Sign in)
Client app - representation of the client’s software (Sign in)
Callback URL - after the first authentification, the client will be redirected to this URL with an authentication code
Access token - allows you to retrieve data from BIM 360 Refresh token - allows you to get a new Access token without contacting the user

Building a testing environment

  1. Creating an Autodesk accounts

    • Company account (OurCompany)
    • Employee account (OurEmployee)
    • Company’s client account (OtherCompany)
    • Application account (application)
  2. Creating a client app

    • Sign in at Autodesk forge with an App account
    • Go to my apps
    • Create a new app
    • Set app name and callback URL
  3. Request a BIM 360 demo for OurCompany and OtherCompany

  4. Prepare a project for the OurCompany and OtherCompany

    • Sign in at BIM 360 admin
    • Create a testing project
    • Click on the project in the project list
    • On the page, you have been redirected to click to “Add member” and fill an email with the email of OurEmployee
  5. Connect your client app to the OurCompany and OtherCompany

    • Sign in at BIM 360 admin
    • Go to settings
    • Open “Custom integrations”
    • Create new custom integration
      • Select only “Document Management”
      • Select “I am a developer”
      • Go to the app you have created in step 2 and copy the client id to fill the dialog window
      • Type some name of integration and click save

BIM 360 Authentication

To read any data of project you have to go through “Three-legged authentication”

Step by step

  1. Getting access token with users attention (First authentication or missing refresh token)

    • Getting authentication code
      • Usage: Thanks to the refresh token this step is required only once at the beginning, placed for example on some button
      • URL: https://developer.api.autodesk.com/authentication/v1/authorize
      • Parameters:
        • Client id (at your Forge App)
        • Client secret
        • Client callback URL (redirect_uri)
        • Type of response (response_type=code)
        • Access privileges you want to get from the user (scope=data:read)
      • What will happen:
        • User will be redirected to the Autodesk authentication page
        • After the user signs in he will be asked to grant privileges to your app
        • When the user allows app access he will be redirected to your callback URL with authentication code in the URL parameter

    • Getting access token
      • Usage: This token is used to authenticate your app when you requesting data
      • URL:https://developer.api.autodesk.com/authentication/v1/gettoken
      • Headers: “Content-Type: application/x-www-form-URLencoded”
      • Method: “POST”
      • Parameters:
        • client_id (in your Forge App)
        • client_secret
        • Client callback URL (redirect_uri)
        • Type of the authorization(grant_type=code)
        • Authentication code retrieved from the previous request
      • What will hapen: After submitting the request server sends a response including “Access token” and “Refresh token”

  2. Getting access token with the refresh token
    • Usage: This token is used to authenticate your app when you requesting data
    • URL:https://developer.api.autodesk.com/authentication/v1/refreshtoken
    • Headers: “Content-Type: application/x-www-form-URLencoded”
    • Method: “POST”
    • Parameters:
      • client_id (in your Forge App)
      • client_secret
      • Type of authorzation (grant_type=refresh_token)
      • Refresh token you have stored
    • What will hapen: After submitting the request server sends a response including “Access token” and “Refresh token”

More details at BIM 360 API


Tags: