Company/Classroom/Enterprise Settings - Developer
仅适用于
Allow Enterprise admins to create new applications to which enterprise users can subscribe. Admins can manage and distribute these applications to specified users. Admins can also create, view, and delete API keys for users in their company or enterprise.
有关使用 Onshape 应用的更多信息,请参阅 Onshape API 开发者文档。
To navigate to your Developer settings in Onshape, click on your Account user icon () in the top right corner of your Onshape window. This opens a dropdown menu. Click Company/Classroom/Enterprise settings.
在页面左侧的列表中单击“开发者”:
What admins can do from this screen
-
Create an internal application in the company settings without going to the App Store dev portal.
-
Manage the application internally.
-
View, create, and delete API keys for anyone in the company.

-
单击 OAuth 应用程序链接:
-
单击“创建新 OAuth 应用程序”按钮:
-
按如下方式填写信息(请注意,屏幕上还提供了详细信息):
-
名称 - 向用户显示的应用程序的名称。
-
主要格式 - 用于标识应用程序的唯一字符串,不向用户显示。
-
摘要 - 有关应用程序的信息。
-
重定向 URL - 验证后您被重定向到的 URL。
-
类型 - 应用程序类型。选项包括集成云应用程序、互联云应用程序或互联桌面应用程序。
-
OAuth URL - 用于从 OnShape 应用程序页面启动 OAuth 流程的 URL。
-
设置
-
支持协作 - 在开发应用程序时检查您是否希望与其他用户协作。
-
- 权限 - 请参阅下面的权限范围。
-
-
单击“创建应用程序。
-
使用“搜索成员”字段查找和选择要加入应用程序开发和/或测试的用户。
-
向用户提供允许访问应用程序的“授权应用程序”屏幕:
-
有关使用 OAuth 对应用程序进行身份验证的信息,请参阅 API 指南:身份验证。

All applications submitted to the Onshape App Store (Onshape Apps) must follow the instructions on the API Guide: OAuth2 page and use OAuth2 for authorization. Automation scripts (or applications not meant for the Onshape App Store) may use either OAuth2 or API Keys for authentication. OAuth2 allows applications to call Onshape APIs on behalf of the users of the application; API keys will only perform operations on behalf of the Onshape user who generated the API keys.
API keys are a useful way create small applications meant for personal use, allowing developers to avoid the overhead of the OAuth workflow.
API keys are used to authenticate an application, not its users. (OAuth2 authenticates an application and users of the application by ensuring the users are authorized to access Onshape.) Once you create an API key, it is valid only in the stack on which it was created. An API key created on companyName.onshape.com will not function on cad.onshape.com.
API keys that are not associated with a company or enterprise can be managed through the My Account - Developer page.
查看 API 密钥
- In your Company/Classroom/Enterprise Developer settings, click API keys
- Review the API keys available for the company.
创建 API 密钥
- In your Company/Classroom/Enterprise Developer settings, click API keys
- 点击创建新的 API 密钥。
- 在“名称”字段中提供 API 密钥的名称。
-
Assign the API key to someone in the company. You can search by name or email in the User field.
- 选择密钥的权限。请参阅下面的权限范围。
- 单击“创建 API 密钥”按钮。
-
在弹出窗口中,复制显示的 API 密钥和密钥,将其保存在某个地方,然后单击“关闭”按钮。
您将无法再次找到密钥,因此请将其保存在安全的地方!
- 有关使用 API 密钥对应用程序进行身份验证的信息,请参阅 API 指南:认证。
删除 API 密钥
- 点击您要删除的 API 密钥右侧的 “X” 图标。
- 确认您要为所有用户删除此 API 密钥。此操作无法撤消。单击“删除”进行确认。

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