Get Help

Onshape Help

See the Onshape Help Docs at https://cad.onshape.com/help/Content (or https://<companyName>.onshape.com/help/Content for Enterprise accounts).

Contact Us

You can contact the Onshape API Support team at api-support@onshape.com, or browse through our FAQs and troubleshooting tips below.

FAQs

What is the user experience of granting and revoking OAuth access?

Once users have purchased the application from the App Store, they will start seeing actions and panel icons as described by the extensions. When they try to use these actions and panels, they will be prompted by an error message stating that they need to grant access first.

They can grant access by navigating to the ‘Applications’ section under ‘My Account’.

image alt text

Users will have to grant 2 permissions. The first button called ‘Onshape access’ will enable the application to make calls to the Onshape API. This will require the user’s Onshape credentials.

The second button calls ‘External access’ and enables Onshape to make calls to the application API. This will require the user’s credentials in the application. Both modes of access use OAuth, so credentials are not stored in the other system.

If the access is revoked at any time, the actions and panels will ask the user to re-authenticate from the ‘Applications’ page. Access may be revoked manually from Onshape or the application, or because a new version is installed that requires a different scope.

Who can get access to my app, and how?

Applications with extensions are only available to people who have been explicitly granted this permission in Onshape. Users who have been given this permission will be able to go to the App Store and purchase the application. There is no change to this process from earlier. They will then be able to grant access to the application as described in the previous question.

Do not publish your application if it contains extensions in the App Store for all users. Other users (who have not been granted permission) will not be able to see the extensions and will have a bad experience.

How is my application informed about selection changes in the Onshape UI?

Let’s take the case where your application has an extension that is showing some information in the document info panel that is based on document selection. As the selection changes, the action URL passed to the extension will change (based on parameterization). The new action URL will be loaded into the IFrame for the extension, and the application page will reload. We are adding support for post messages to reduce loading overhead in the future.

What is the timeout for the action_url of extensions? Is it configurable?

Timeout set for each GET or POST request set as action_url of an extension is 180 seconds. Timeout is not configurable.

What changed when my legacy application migrated to extensions?

If you had created a desktop or connected ckoud app, nothing has changed.

If you had created an integrated cloud app, the following changes have been made to the app.

  • The IFrame URL has been changed to the OAuth URL. This is now invoked from the user’s application setting page to grant OAuth access. A redirect URL is passed along with the call as a query parameter named ‘redirectOnshapeUri’. You will need to modify your code to redirect to this URL if it is present.
  • A new tab extension is automatically created for your applications. The target URL for this extension is the earlier IFrame URL. This should continue to work as earlier.
  • The tab icon will also be populated into the extension from the earlier application icon and should work as earlier.