1
votes

I have a 3-legged authentication token, and for some reason when I access the API, I get the following error:

"reason":"Only 2 legged service tokens are allowed to access this api."

This is how I access the API (using the npm package curlrequest, and replacing with my token):

var options = {
    url: 'https://developer.api.autodesk.com/project/v1/hubs',
    method: 'GET',
    headers: {
        'Authorization': 'Bearer <Token>'
    }
};

curl.request(options, function (err, parts) {
    parts = parts.split('\r\n');
    var data = parts.pop()
        , head = parts.pop();

    console.log(data);
});

Am I doing something wrong? Is it only possible to access the Data Management API with a 2-legged token?

Thanks.

1

1 Answers

0
votes

So, yes, you can only use 2-legged tokens on the Data Management API. You cannot use 3-legged tokens instead of 2-legged ones, they are meant to do different things.