For a customer of mine I am setting up an integration to retrieve all documents from their BIM360 and Construction Cload projects and syncing them to the projects in their own (custom) software. To achieve this, I am using the Data Management API.
However, when retrieving the hubs the user has access to, no data is returned but three warnings are given. The ErrorCode returned is BIM360DM_ERROR
with a status code of 403
. The warning is given three times; one for each BIM360 region.
I am using a three-legged auth token and calling this route:
https://aps.autodesk.com/en/docs/data/v2/reference/http/hubs-GET/
To be sure this is not related to the scopes used to retrieve the auth token, I am currently authorizing all scopes found here:
https://aps.autodesk.com/en/docs/oauth/v2/developers_guide/scopes/
Other BIM360 and Construction Cloud API calls work as intended using the same auth token and the same project IDs.
I am using Laravel 10
running on php8.2
and calling the Data Management API as follows:
$response = Http::withHeaders([
'Authorization' => "Bearer {$accessToken}",
])->get('https://developer.api.autodesk.com/project/v1/hubs');
The following response is returned:
{
"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
},
{
"Id":null,
"HttpStatusCode":"403",
"ErrorCode":"BIM360DM_ERROR",
"Title":"Unable to get hubs from BIM360DM APAC.",
"Detail":"You don't have permission to access this API",
"AboutLink":null,
"Source":null,
"meta":null
}
]
}
}
Does anybody know where I am making an error / which permission is not correctly set? Thank you in advance for any help!