and more in a single search tool across platforms. Read the announcement here. |
03/22/2024 06:54 AM
Does anyone happen to have a sample connectionJson for Servicenow using basic auth they could share?
There is this in the doc
{
"authentications": {
"acctAuth": {
"authType": "Basic",
"url": "https://<domain name>/api/tbng4/custom_service_catalog_api/cat_item/6b8cd34c1b227300c2bf2f066e4bcbf1",
"httpMethod": "POST",
"httpHeaders": {
"content-Type": "application/json" },
"properties": {
"userName": "<user name>",
"password": "<password>" },
"httpContentType": "application/json",
"expiryError": "ExpiredAuthenticationToken",
"retryFailureStatusCode": [401],
"authError": [
"Internal server error" ],
"timeOutError": "Read timed out",
"errorPath": "message",
"maxRefreshTryCount": 5,
"tokenResponsePath": "access_token",
"tokenType": "Basic",
"accessToken": "Basic abcd" }
}
}
Im not sure what that provided URL is for? That doesn't look like an authentication endpoint.
03/22/2024 12:35 PM
@jralexander137 Please refer to below JSON
{
"authentications": {
"acctAuth": {
"authType": "Basic",
"url": "<URL>",
"httpMethod": "POST",
"httpParams": {},
"httpHeaders": {},
"httpContentType": "text/html",
"properties": {
"userName":"<<USERNAME>>/token",
"password":"<<PASSWORD>>"
},
"expiryError": "ExpiredAuthenticationToken",
"authError": [
"InvalidAuthenticationToken",
"AuthenticationFailed"
],
"timeOutError": "Read timed out",
"testname": "<test URL>",
"errorPath": "error.code",
"maxRefreshTryCount": 5,
"tokenResponsePath": "access_token",
"tokenType": "Basic",
"accessToken": "Basic <<TOKEN>>",
"apiRateLimitConfig": {"retryAfterCalls": 100,"retryWaitSeconds": 60}
}
}
}
{
"authentications": {
"acctAuth": {
"authType": "Basic",
"url": "<URL>",
"httpMethod": "POST",
"httpParams": {},
"httpHeaders": {},
"httpContentType": "text/html",
"properties": {
"userName":"<<USERNAME>>/token",
"password":"<<PASSWORD>>"
},
"expiryError": "ExpiredAuthenticationToken",
"authError": [
"InvalidAuthenticationToken",
"AuthenticationFailed"
],
"timeOutError": "Read timed out",
"testname": "<test URL>",
"errorPath": "error.code",
"maxRefreshTryCount": 5,
"tokenResponsePath": "access_token",
"tokenType": "Basic",
"accessToken": "Basic <<TOKEN>>",
"apiRateLimitConfig": {"retryAfterCalls": 100,"retryWaitSeconds": 60}
}
}
}
03/25/2024 05:37 AM
What do you populate in the <<TOKEN>> for basic auth? Didnt think that was needed for basic auth?
03/24/2024 07:28 PM
You can open any url of service now and add into URL Section
Any reason for not using oauth ?
03/25/2024 05:38 AM
Trying to get them to do OAuth, not sure why they don't at the moment.
03/25/2024 10:18 PM
@jralexander137
you can use the below Json.
{
"authentications":{
"acctAuth":{
"authType":"basic",
"errorPath":"error.code",
"maxRefreshTryCount":5,
"tokenResponsePath":"access_token",
"properties":{
"userName":"<Username>",
"password":"<Password>"
},
"authError":[
"InvalidAuthenticationToken",
"AuthenticationFailed"
],
"retryFailureStatusCode":[]
}
}
}