context:
genesys cloud v24.4.0. architect flow triggers outbound dialing campaign. on ‘contact answered’, a data action sends webhook to servicenow (washington dc) to create incident. payload includes callerid, campaignid, and timestamp. authentication is basic auth with api token. issue:
webhook fails with 401 unauthorized. servicenow logs show request received but token invalid. checked token permissions in genesys cloud, all look correct. tried regenerating token, same error. curl test from local machine works fine, so firewall is not blocking. suspect issue is how genesys cloud formats the authorization header in data action webhook. docs are vague on this. anyone else hit this? looking for exact header format or workaround. appreciate any help.
If I remember correctly… the 401 usually stems from how the token is encoded in the header rather than the token permissions themselves. The Genesys Cloud webhook action sometimes strips whitespace or fails to base64 encode the username:password string correctly when passed as a simple string variable. Try constructing the header explicitly in the data action using a script node before the webhook call. Use Buffer.from(username + ':' + password).toString('base64') to generate the token string, then set the header value to Basic + that result. Also, verify the ServiceNow instance requires the specific scope for the API user. If the token works in Postman but fails in Genesys, check if the outbound IP is blocked by ServiceNow’s firewall rules for that specific environment.