0

I'm trying to pubhlish a project using this guide - https://forge.autodesk.com/en/docs/data/v2/tutorials/publish-model/

I am able to get the docs hub ID for the expected hub (using 3 legged token, after having Autodesk provision the b360 docs account, and setting up integration w/ forge app), and pass this into the call to get the projects (using same token, or new token) using this guide - https://forge.autodesk.com/en/docs/data/v2/reference/http/hubs-hub_id-projects-GET/

I get back a response 404 error using the hub ID provided in the GET hubs call that starts with b.xxx from the GET hubs

{
"developerMessage": "The requested resource does not exist.",
"moreInfo": "https://forge.autodesk.com/en/docs/oauth/v2/developers_guide/error_handling/",
"errorCode": ""
}

I've tried this with a. as well, instead of b. and also no prefix on hub ID with no luck. I verified that this Id matches what is shown in the account admin settings online as well.

The get request looks like this, and includes authorization token in format Bearer {{token}} where {{token}} is the (same) variable for the token that works when getting hub ID's.

https://developer.api.autodesk.com/project/v1/hubs/b.e3a26052-6b48-4a03-9115-xxxxxxxxxxx/projects

Is my format incorrect, or is there something else going on?

shaneshaneshane
  • 59
  • 1
  • 1
  • 8

1 Answers1

0

The request looks ok, incl. the hub ID (the b. prefix must be there). One thing to check for is whether the actual user you're using to obtain the 3-legged token has access to any projects inside this hub.

Also, what happens when you try the GET hubs/:hub_id endpoint? Can you see the hub information or do you get 404 as well?

Petr Broz
  • 8,891
  • 2
  • 15
  • 24
  • I do indeed have projects listed in this hub. When I try the GET hubs/:hub id with the same ID as above I receive a 403 error. { "jsonapi": { "version": "1.0" }, "errors": [ { "id": "941d6027-cfcc-493e-xxxx-xxxxxxxxxxxx", "status": "403", "code": "BIM360DM_ERROR", "detail": "Failed to get the hub for id b.e3a26052-6b48-4a03-xxxx-xxxxxxxxxxx" } ] } – shaneshaneshane Sep 24 '20 at 05:07
  • According to the docs, the 403 error code indicates that: `The request was successfully validated but permission is not granted or the application has not been white-listed. Do not try again unless you solve permissions first.`. So it really looks like a permission issue, either with the Forge app itself, or with the user account you are trying to use to access the hub and its projects. – Petr Broz Sep 24 '20 at 06:26