公司/教室/企业设置 - 开发者
仅适用于
Enterprise and Professional admins can register new applications with Onshape, manage and distribute applications to users, and manage API keys for users.
The steps on this page apply only to company, classroom, or enterprise administrators. Individual users should follow the Developer Portal steps instead.
All applications created in the Company/Classroom/Enterprise Settings count towards the company's API Limits. All applications created in the Developer Portal count toward the individual user's API Limits.
For more information on creating and managing Onshape applications, please see the Onshape Developer Docs.
Click your user icon (
) in the top right corner of the Onshape window and select Company/Classroom/Enterprise settings from the dropdown.
Click Developer in the left pane:
-
Register a new OAuth application with Onshape
-
Share applications with users, aliases, and teams within the company
-
Submit properly authenticated apps to the Onshape App Store
-
View, create, and delete API keys for anyone in the company
-
View API usage for the company
- See API Limits for more information on API usage.
-
Notification emails are sent to all admins at 25%, 50%, 75%, and 100% of usage.
The steps on this page apply only to company, classroom, or enterprise administrators. Individual users should follow the Developer Portal steps instead.
All applications created in the Company/Classroom/Enterprise Settings count towards the company's API Limits. All applications created in the Developer Portal count toward the individual user's API Limits.
To create an app that opens in the Onshape UI for internal use or testing:
- Register the app with Onshape.
- Create an extension for the app in the Onshape UI.
- Assign users to the app.
To publish the app to the Onshape App Store for end users:
- Authenticate with OAuth2.
- Create an app store entry.
- Complete the Launch Checklist
-
Click the OAuth applications link on the Developer page to see a list of all your apps:
-
Click the Create new OAuth application button.
-
Fill out the form:
-
名称 - 向用户显示的应用程序的名称。
-
Primary format - String that uniquely identifies your application and is a marker for the data it might store on Onshape servers (e.g.,com.example.example). Cannot be changed after the application is registered. Not displayed to users.
-
Summary - Description of the application, shown to the user when they’re asked to grant the application permission to access their data.
-
Redirect URLs - URL to which you are redirected after authentication; the landing page of your application.
- Your application must specify at least one URL used in the OAuth protocol exchanges.
-
This URL must also use SSL (a URL that begins with https), with two exceptions applicable for installed desktop applications: http://localhost:<port> and urn:ietf:wg:oauth:2.0:oob.
-
Type - Application type: Integrated Cloud App, Connected Cloud App, or Connected Desktop App.
-
OAuth URL - URL used to start the OAuth2 process to authenticate the user. See Developer Docs: OAuth2 for details.
-
Should contain the URL of your deployed application.
-
This is the first URL called from the Onshape Applications page.
-
The page hosted at this URL should handle the OAuth authentication. Once your application’s server has been authenticated on behalf of the user, that user should be redirected to your applications content.
-
If you have not deployed your app yet, you can leave this field blank for local work and update it later.
All applications submitted to the Onshape App Store for public use must authenticate properly with OAuth2. See Developer Docs: OAuth2 for details.
-
-
设置
-
支持协作 - 在开发应用程序时检查您是否希望与其他用户协作。
-
- 权限 - 请参阅下面的权限范围。
-
-
单击“创建应用程序。
-
Copy the OAuth secret key from the window.
You will not be able to access this secret key again. This secret is unique to you and your app. It should be protected like any sensitive password and never checked into source code.
-
The app's OAuth application entry appears with the Details tab active. Selecting the app name on the OAuth applications page now brings you to this screen.
Use the tabs on this screen to:
-
Details:
-
Settings: Manage app settings
- Keys and secret:
- Copy the OAuth client identifier key
- Regenerate a new OAuth client secret key
-
Permissions: Modify app permission scopes
-
Extensions: Manage app extensions
-
Onshape OAuth: Manage Onshape authentication
-
External OAuth: Manage third-party authentication
See the Onshape Developer Documentation for more information, including: properly authenticating with OAuth2 and completing Launch Checklist. See the Hello World tutorial for a working example.
-
Click OAuth applications on the Developer page, then select your application.
-
Click the Extensions tab.
-
Click Add extension.
-
Fill out the form:
-
Name: Can be truncated in the UI if it is too long.
-
Description (optional): Does not appear in the Onshape UI, but could appear in the authentication grant process.
-
Location: Where the extension exists in the Onshape UI.
-
See Supported Locations and Contexts in the Developer Docs.
-
You can create only one element tab extension per application.
-
-
Context: Some locations work in the context of a selection, such as inside a Part Studio.
-
See Supported Locations and Contexts in the Developer Docs.
-
-
Action URL: Locations that embed a UI use the action URL to define the address of the page to display. The action URL is used to specify the REST endpoint if the location is an action (context menu, toolbar item, action in dialog etc.) and the action type is GET or POST. If the location is an action and the action is Open in new window, the action URL is the URL to open in the new window.
-
See Action URL parameters in the Developer Docs for a list of parameters that can be used in this field.
-
-
Action type: Applicable for locations that do not embed UIs. Supported action types are:
-
GET - This makes a GET API call using the action URL. Parameter replacement is done on the action URL.
-
POST - This makes a POST API call using the action URL and the action body as the post body. Parameter replacement is done on both the action URL and the action body.
-
Open in new window - This opens the action URL in a new browser window. Parameter replacement is done on the action URL.
-
-
Action body: Only applicable for POST action types. The action body is passed in a POST API call and must be in a valid JSON format.
-
Show response: This is only applicable if the action type is GET or POST. When selected, the UI waits for a response and shows the response in a dialog in the UI. The response must be in a valid JSON format.
-
Icon: The icon is displayed where the extension exist, which can include an icon in an Info panel, context menu action, toolbar button, action button in a dialog, or other supported locations.
-
-
单击确定。
For more information on creating and managing Onshape applications, please see the Onshape Developer Docs. Please see the Hello World tutorial for a working example.
Admins can add internal users to applications for testing before submitting to the Onshape App Store. Users added here automatically see the associated app extensions in their Onshape UI, without having to subscribe via the app store.
-
Once your app is registered, click Applications in the left pane.
-
Select the application in the list.
-
Begin typing the name or email of a user, team, or alias in the Add users or teams field, and select a result from the list. The admin who created the app is automatically in the Users list. Continue adding names or emails.
-
Click the Add button.
Light users cannot be added to applications.
To remove a user, alias, or team from the app, click its X icon in the Remove column.
- 在您的“开发者设置”中,单击“OAuth 应用程序”。
- 单击要转让的应用程序的名称。
- 单击“详细信息”页签上的“转让所有权”按钮。“转让”对话开启。

- 选择一个选项,将应用程序转让给个人、公司或企业。
- 要转让给个人,请在搜索输入框中输入新所有者的姓名或电子邮件。要将所有权转让给公司或企业,请从下拉列表中选择一个选项。
- 单击“转让所有权”。该应用程序会从您的 OAuth 应用程序列表中移除。
- If the app is transferred to an individual account, they receive an email notification and the app appears in their Onshape Developer Portal.
- If the app is transferred to someone in a Company/Classroom/Enterprise, all Admins receive an email notification and the app appears in their Developer Settings.
未来的 API 调用消耗和计费将归属于新所有者。详细信息请参见“API 限制”。
Before submitting an app to the Onshape App Store, see the Onshape Developer Documentation for requirements, including properly authenticating with OAuth2 and completing Launch Checklist.
To review, edit, or delete an existing Onshape App Store entry, click Store entries in your Developer settings, then select the entry to modify.
To create a new store entry for an OAuth application:
-
在您的“开发者设置”中,单击“OAuth 应用程序”。
-
Click the app name in the list.
-
Click Create store entry on the app's Details page.
-
Fill out the form:
- Name - Automatically set from the app name provided during registration.
-
Summary - Automatically set from the summary provided during registration.
-
Type - Application type: Integrated Cloud App, Connected Cloud App, or Connected Desktop App. This should match the Type that was selected when registering the OAuth application.
-
Category - Select the appropriate category for your app.
-
Team Visibility - Choose to make the private app store entry visible to no internal users (default), all internal users, or specific teams.
-
Description - User-facing description of the application. Limited formatting allowed.
-
Support URL - URL or email users of your app should be directed to for assistance. This must be actively monitored.
-
Support Email - Email that should receive app subscription notifications. This must be actively monitored.
-
Vendor - Your company name.
-
Version - Current version of this application.
-
Images - Optionally upload summary, hero, and other images.
-
Click Create.
The application appears in the Onshape App Store as private. It is viewable only to you and any internal teams specified in Team Visibility settings. To make the app public, see the Launch Checklist next.
- Click Developer in the left pane of your company settings.
- If your app has an Onshape App Store entry, delete that first:
- Click Store entries on the Developer page.
- Click the store entry to delete.
- Click Delete store entry on the Details tab.

- Click Delete again to confirm.
- Click Developer in the left pane or breadcrumbs to return the Developer landing page.
- Click OAuth applications in the Developer settings.
- Click the application to delete.
- Click Delete application on the Details tab.

- Click Delete again to confirm.
所有提交到 Onshape 应用商店(Onshape 应用)的应用程序都必须遵循 API 指南:OAuth2 页面上的说明,并使用 OAuth2 进行授权。自动脚本(或不适用于 Onshape 应用商店的应用程序)可能会使用 OAuth2 或 API 密钥进行认证。OAuth2 允许应用程序代表用户调用 Onshape API;API 密钥只能代表生成 API 密钥的 Onshape 用户执行操作。
API 密钥是创建供个人使用的小型应用程序的有用方法,可让开发者避免 OAuth 工作流程的开销。
API 密钥用于对应用程序进行身份验证,而不是对用户进行身份验证。(OAuth2 通过确保用户有权访问 Onshape 来对应用程序和应用程序用户进行身份验证。)创建 API 密钥后,它仅在创建 API 密钥的堆栈中有效。在 companyName.onshape.com 上创建的 API 密钥无法在 cad.onshape.com 上运行。
与公司或企业无关的 API 密钥可通过“我的帐户 - 开发者”页面进行管理。
查看 API 密钥
- 在您的公司/课堂/企业开发者设置中,单击 API 密钥
- 查看公司可用的 API 密钥。

创建 API 密钥
- 在您的公司/课堂/企业开发者设置中,单击 API 密钥
- 点击创建新的 API 密钥。

- 在“名称”字段中提供 API 密钥的名称。
-
将 API 密钥分配给公司中的某人。您可以在“用户”输入框中按姓名或电子邮件进行搜索。
- 选择密钥的权限。请参阅下面的权限范围。
- 单击“创建 API 密钥”按钮。
-
在弹出窗口中,复制显示的 API 密钥和密钥,将其保存在某个地方,然后单击“关闭”按钮。
You will not be able to access this secret key again. This secret is unique to you and your app. It should be protected like any sensitive password and never checked into source code.
- 有关使用 API 密钥对应用程序进行身份验证的信息,请参阅 API 指南:认证。
删除 API 密钥
- 点击您要删除的 API 密钥右侧的 “X” 图标。
- 确认您要为所有用户删除此 API 密钥。此操作无法撤消。单击“删除”进行确认。

创建 OAuth 应用程序时可以使用以下权限范围:
-
应用程序可以读取您的配置文件信息 (OAuth2ReadPII) - 选中以允许应用程序访问您的配置文件中的信息。
-
应用程序可以读取您的文档 (OAuth2Read) - 选中以允许应用程序读取您的文档。
-
应用程序可以写入您的文档 (OAuth2Write) - 选中以允许应用程序对您的文档进行写入访问。
-
应用程序可以删除您的文档和工作区 (OAuth2Delete) - 选中以允许应用程序访问删除您的文档和工作区。
-
应用程序可以代表您请求购买 (OAuth2Purchase) - 勾选此项以允许应用程序为您进行购买。
-
应用程序可以代表您共享和取消共享文档 (OAuth2Share) - 选中此选项可允许应用程序共享和取消共享您的文档。