ServiceNow 凭据(ServiceNow credentials)#
你可以使用以下凭据验证以下节点:
🌐 You can use these credentials to authenticate the following nodes:
先决条件(Prerequisites)#
创建一个 ServiceNow 开发者账户。
🌐 Create a ServiceNow developer account.
支持的身份验证方法(Supported authentication methods)#
- 基本身份验证
- OAuth2
相关资源(Related resources)#
有关该服务的更多信息,请参阅 ServiceNow 的 API 文档。
🌐 Refer to ServiceNow's API documentation for more information about the service.
使用基本身份验证(Using basic auth)#
要配置此凭据,你需要:
🌐 To configure this credential, you'll need:
- 用户 名称:请输入你的 ServiceNow 用户名。
- 密码:输入你的 ServiceNow 密码。
- A 子域名:你的 ServiceNow 实例的子域名在你的实例 URL 中:
https://<subdomain>.service-now.com/。例如,如果完整 URL 是https://dev99890.service-now.com,那么子域名就是dev99890。
使用 OAuth2(Using OAuth2)#
要配置此凭据,你需要:
🌐 To configure this credential, you'll need:
- A 客户端 ID:在你注册一个新应用时生成。
- 一个 客户端密钥:在你注册新应用时生成。
- A 子域名:你的 ServiceNow 实例的子域名在你的实例 URL 中:
https://<subdomain>.service-now.com/。例如,如果完整 URL 是https://dev99890.service-now.com,那么子域名就是dev99890。
要生成你的客户端ID和客户端密钥,请在系统 OAuth > 应用注册 > 新建 > 为外部客户端创建 OAuth API 端点中注册一个新应用。为你的应用使用以下设置:
🌐 To generate your Client ID and Client Secret, register a new app in System OAuth > Application Registry > New > Create an OAuth API endpoint for external clients. Use these settings for your app:
- 复制 客户端 ID 并将其添加到你的 n8n 凭证中。
- 输入 客户端密钥,或留空以自动生成随机密钥。将此密钥添加到你的 n8n 凭证中。
- 复制 n8n OAuth 重定向 URL 并将其添加为 重定向 URL。
有关更多信息,请参阅 如何为 RESTMessageV2 集成设置 OAuth2 认证。
🌐 Refer to How to setup OAuth2 authentication for RESTMessageV2 integrations for more information.