Some PDIs are currently unavailable, and PDI actions are paused. View the latest updates here. Read More

Getting An error - AWS connect - Voice agent

Paulsylo
Tera Sage

HI All -

 

I trying to connect AWS connect for my voice agent as communication channels. As per the guide , i see we need to share these three information to AWS side to be configured. 

 

Paulsylo_0-1783969524212.png

while i got other information, i got stuck here up on these one information,

 

1. ssm_oauth_path, as it is given " The base path for OAuth credentials in AWS Parameter Store: /com.servicenow.cti/<sn-instance-id>/<voice-service-id>. Set after completing the Parameter Store setup in the following steps "

 

now , what is this <voice-service-id>,to be taken. 

Paulsylo_1-1783969885909.png

do i need to take the sys_id from the url ? if so, i am getting this error below,

 

{     "level": "ERROR",     "message": "Failed to obtain access token",     "error": "OAuth token request failed: HTTP 401 for POST tataamericaintlcorpdemo2.service-now.com/oauth_token.do"}

 

any help will be appreciated .

 

 

Regards,
PaulSylo

To be is to do. To do is to be.
7 REPLIES 7

Vikram Reddy
Tera Guru

Hello @Paulsylo,

 

The voice-service-id piece is exactly what your own second screenshot already spells out, so trust it:

/com.servicenow.cti/<sn-instance-id>/<voice-service-id>

sn-instance-id  = value of the instance_id system property (sys_properties.list, NOT your instance name)
voice-service-id = sys_id of the Voice Service record

That part's fine, taking it from the URL is correct as long as it's the Voice Service record's sys_id. The 401 on oauth_token.do is a separate problem: it means what's sitting in Parameter Store doesn't match the OAuth Application Registry entry on the ServiceNow side. Ninety percent of the time that's someone pasting the client secret's sys_id instead of the actual secret value, or the application registry record itself being inactive. Check both, and while you're in there confirm the value under that path still points at the right voice-service-id, not a leftover from an earlier attempt.

 

Thank you,
Vikram Karety
Octigo Solutions INC

HI Vikram - Thanks for the quick response. I chcked both , and seems to be correct . is there any thing i need to do with oauthregistry ? if possible, can ytou share some screenshot to check ?

 

HI @Victor Chen - can help or suggestion ?

Regards,
PaulSylo

To be is to do. To do is to be.

Hello @Paulsylo,

 

I dont have a specific screenshot but Application Registry record details are these. Pull up System OAuth > Application Registry, open your entry, and check:

Grant type: Client Credentials
Active: true
Client Secret: matches the raw value in AWS Parameter Store (not the sys_id)
OAuth Application User: populated, active, has the role your integration needs

That last one is the piece people miss even after confirming active and the secret. For the Client Credentials grant, ServiceNow needs an OAuth Application User to impersonate on the token request. If that field is blank, points to an inactive user, or that user lacks the role your Voice integration calls with, oauth_token.do will still throw a 401 even though the registry itself looks "active" and correct otherwise.

If it's still failing after that, paste the exact response body from the 401 (not just the status code), that'll narrow it down fast.

 

Thank you,
Vikram Karety
Octigo Solutions INC

Hi @Vikram Reddy - When i tried through postman , this is the error,

 

"message": "REST call for action execute failed. Message: Request to backend service failed. Response from web service: {\"error_description\":\"access_denied\",\"error\":\"server_error\"} [882fb12b-1080-4d18-b22c-c147c1266ad5]",

Regards,
PaulSylo

To be is to do. To do is to be.