After upgrading to version 2 of the authentication API, we seem to get an error when trying to retrieve the access token for multiple urns (>9 IFC models).
Here’s how we’re defining the scope parameter:
const modelScopes = models
.map((model) => {
const modelUrn = Buffer.from(model.forge_urn, "base64url").toString();
return `data:read:${modelUrn}`;
})
.join(" ");
And here’s how we’re using it:
post(FORGE_AUTH_ENDPOINT, {
headers: {
'Authorization': authorizationHeader,
},
form: {
grant_type: "client_credentials",
scope: modelScopes,
},
})
We had no issues here before, but the new API version seems to stop us from retrieving an access token when the “modelScopes” parameter is too long.
We frequently use more than 10 models, so we need a way to fix this.
New contributor