Doing POC on Virtual Agent API using Postman

PS_1
Tera Contributor

Hello,

Doing a POC following the documentation steps provided in https://docs.servicenow.com/bundle/vancouver-api-reference/page/integrate/inbound-rest/concept/bot-a...
Hitting the https://testabc.service-now.com/api/sn_va_as_service/bot/integration
with below request. Getting in response  "Hi, looks like you're not logged in at the moment." not sure why, as the user is logged in and has all the roles and for testing provided admin role also.
Also posted the same request with ServiceNow Rest API explorer also, still the same issue in response.
If someone has any idea, please suggest.
Request:

  "requestId""start-conv-test789"
  "action""START_CONVERSATION"
  "enterpriseId""ServiceNow"
  "nowBotId"""
  "clientSessionId"""
  "nowSessionId""",
  "message":{ 
    "text"""
    "typed"true
    "clientMessageId""ABC-123" 
  }, 
  "userId""virtual.agent",
  "emailId""virtual.agent@example.com"
}

Response:
Getting the response in logs as :
{
"requestId": "start-conv-test789",
"clientSessionId": "",
"nowSessionId": "",
"message": {
"text": "",
"typed": true,
"clientMessageId": "ABC-123"
},
"userId": "virtual.agent",
"body": [
{
"uiType": "OutputText",
"group": "DefaultText",
"value": "Hi, looks like you're not logged in at the moment.",
"maskType": "NONE"
},
{
"uiType": "TopicPickerControl",
"group": "DefaultPicker",
"nluTextEnabled": true,
"promptMsg": "To connect to a Live Agent, or to check what I can help with now, select Show me everything. To see more, log in first.",
"label": "Show me everything",
"options": [
{
"label": "Live Agent Support",
"value": "b489e7871b3a11503ed999bc1d4bcbe2",
"order": 300,
"promoted": true,
"enabled": true
}
]
}
],
"score": 1
}
5 REPLIES 5

trinadh2
Giga Guru

Hi,

Did you get any help on this one. I too had the same issue.

 

Could you please help me in knowing if you are successfull.

 

Thanks

Lener Pacania1
ServiceNow Employee
ServiceNow Employee

Assuming you did all the setup steps (i.e. install plugin, enabled endpoints, etc.). Did you try logging in as admin and using basic auth.  Looks like your connection code is correct. Below is my postman code and I am able to establish a connection.

 

post.jpg

 

  

Hi Lener,

Yes we did installed the plugin and configured the properties that are specified in the servicenow docs and we did tried the same payload you shared. In the logs we are seeing the welcome message with the topics. Post that we are not able to make the progress.

Conversation table shows the conversation is active as well. We are also passing the history in the payload along with the action as SWITCH

 

Thanks

Trinadh

Lener Pacania1
ServiceNow Employee
ServiceNow Employee

Thanks for the confirm Trinadh, do you have a case open with tech support so they can hop your instance and trouble shoot?