Skip to content

Why there is stil en error: "Legacy endpoint is deprecated" after change the endpoint to the latesest one #125

Description

@DanEXM
  const bucketKey = `bucket-${Date.now()}`;
  await axios.post(
    'https://developer.api.autodesk.com/oss/v2/buckets',
    { bucketKey, policyKey: 'transient' },
    { headers: { Authorization: `Bearer ${token.access_token}` } }
  );

  const fileBuffer = require('fs').readFileSync(filePath);

  const uploadRes = await axios.put(
    `https://developer.api.autodesk.com/oss/v2/buckets/${bucketKey}/objects/${req.file.originalname}`,
    fileBuffer,
    { headers: { Authorization: `Bearer ${token.access_token}`, 'Content-Type': 'multipart/form-data' } }
  );

  const urn = Buffer.from(uploadRes.data.objectId).toString('base64');
  await axios.post(
    'https://developer.api.autodesk.com/modelderivative/v3/designdata/job',
    {
      input: { urn },
      output: { formats: [{ type: 'svf', views: ['2d', '3d'] }] },
    },
    { headers: { Authorization: `Bearer ${token.access_token}` } }
  );

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions