Search code examples
autodesk-forge

Access to ACC Hubs


I am trying to access Project information from ACC using the ACC API. I was able to create a Server-to-Server app and am using Postman to test out the development. I was able to get a 2-Legged access token via the /authentication/v2/token endpoint. However, when I use this token in the authorization header of the /project/v1/hubs endpoint, I don't see anything in the response body for the "data" key. I do have two warnings that say "You don't have permission to access this API".

{
    "jsonapi": {
        "version": "1.0"
    },
    "links": {
        "self": {
            "href": "https://developer.api.autodesk.com/project/v1/hubs"
        }
    },
    "data": [],
    "meta": {
        "warnings": [
            {
                "Id": null,
                "HttpStatusCode": "403",
                "ErrorCode": "BIM360DM_ERROR",
                "Title": "Unable to get hubs from BIM360DM US.",
                "Detail": "You don't have permission to access this API",
                "AboutLink": null,
                "Source": null,
                "meta": null
            },
            {
                "Id": null,
                "HttpStatusCode": "403",
                "ErrorCode": "BIM360DM_ERROR",
                "Title": "Unable to get hubs from BIM360DM EMEA.",
                "Detail": "You don't have permission to access this API",
                "AboutLink": null,
                "Source": null,
                "meta": null
            }
        ]
    }
}

I have admin privileges to the ACC projects in my account and my app has all the possible APIs checked out. Is there something else I need to do so that I can see the projects I have access to?


Solution

  • My issue was that I had not "provisioned access in other programs":

    In certain cases it is possible for your application to integrate with other APS-based products such as Autodesk Construction Cloud, or Autodesk BIM 360. We leverage this capability in the Hubs Browser tutorial where you can learn about accessing designs from Autodesk Docs, BIM 360 Docs, or Fusion Teams.

    However, some of these products must provision access for a specific APS application based on its client ID. Follow the steps below for any specific product you would like to integrate your application with.

    This article includes the necessary steps to gain access to hubs, but you will need someone with access to Account Admin settings to go through the process or grant you, as a developer, access. The steps are reproduced below:

    1. Log into your ACC account, and navigate to Account Administration
    2. On the Account Admin page, go to BIM 360 Admin > Settings, and navigate to the Custom Integrations tab
    3. Use the Add Custom Integration button on the left side to start a simple wizard that will guide you through the process
    4. On the Select Access page, keep both the BIM 360 Account Administration and the Document Management options checked, and hit the Next button
    5. On the next page of the wizard, choose the I'm the developer option, and hit the Next button
    6. On the next and final page, make note of the BIM 360 Account ID, check the checkbox next to it, and fill out the Client ID and the App Name fields exactly as they appear in your application's page on https://aps.autodesk.com/myapps
    7. When ready, scroll down and hit the Save button

    After completing the process, your application will be able to use different APS services such as Data Management API or ACC API to access information from all projects under this ACC account.