Autodesk Forge의 DerivativeApi이 내 고객 ID 및 비밀번호와 작동하지 않습니다. Apis는 승인되지 않은 오류 {statusCode : 403, statusMessage : 'Unauthorized'}을 반환합니다.Autodesk Forge의 DerivativeApi를 호출하는 중 403 오류가 발생했습니다.
그러나 샘플의 클라이언트 ID/암호 (https://github.com/Autodesk-Forge/forge-api-nodejs-client/blob/master/samples/dmSample.js)와 함께 작동합니다.
무료 계정으로 DerivativeApi (번역 용)를 호출하는 데 제한이 있습니까? 또는 나는 무엇인가해야합니까? 여기
은 ...var ForgeSDK = require('forge-apis');
// TODO - insert your CLIENT_ID and CLIENT_SECRET
// Below id/secret from the sample are working, but mine is not.
var CLIENT_ID = 'wmizntnpzCJxPGF9lxsIiTZGbGO2cJqw',
CLIENT_SECRET = 'g5IPJwvhOHcrdbFy';
var derivativesApi = new ForgeSDK.DerivativesApi();
// Initialize the 2-legged oauth2 client
var oAuth2TwoLegged = new ForgeSDK.AuthClientTwoLegged(CLIENT_ID, CLIENT_SECRET,
['data:write', 'data:read', 'bucket:read', 'bucket:update', 'bucket:create'], true);
function defaultHandleError(err) {
console.error('\x1b[31m Error:', err, '\x1b[0m');
}
oAuth2TwoLegged.authenticate().then(function (credentials) {
console.log("**** Got Credentials", credentials);
derivativesApi.getFormats({}, oAuth2TwoLegged, oAuth2TwoLegged.getCredentials()).then(res => {
console.log(res);
}, defaultHandleError);
}, defaultHandleError);
감사