This is a public Forum  publicRSS

Topic

    Chakravarthy Elchuri
    Chat API authentication SOAP request
    Topic posted November 24, 2017 by Chakravarthy ElchuriExpert, last edited November 24, 2017 
    558 Views, 12 Comments
    Title:
    Chat API authentication SOAP request
    Content:

    Hi,

    If any one having sample SOAP request for Chat API authentication please post here.

    i am getting an error response as

    <faultcode>soapenv:Server</faultcode>
     <faultstring>Operation Not Found</faultstring>

     

     

    thanks,

    Chakravarthy

     

    Code Block:

    Answer

     

    • Cynthia Knox

      Perhaps you already discovered this, but, there is an answer that provides an example:  https://cx.rightnow.com/app/answers/detail/a_id/8129/kw/chat%20api%20example

      There is an example wsse:Security element where you fill in your credentials.  Does this help?

    • Robert Surujbhan

      Chakravarthy, the Chat API works with the WS-Security specification which means you need a Security tag in the SOAP Header of your request - that's definitely one problem per Cynthia's comment. 

      Your other potential problem is the Third Party Queue API endpoint.  Keep in mind that you need to call the GetChatUrl SOAP operation first using the API Manager service (where UrlType = UQ), extract the ChatUrl element from that response, and use the ChatUrl as the endpoint when calling the Authenticate ("Authentication") operation.  This is all covered in the Chat API documentation as well.

      Let us know if you need additional examples!

    • Danette Beal

      Hi,

      I am going to move this one to Connect Data Services for better visibility on SOAP API.

      Regards,

      Danette, Community Manager

    • Chakravarthy Elchuri

      Hi  Cynthia,

      I am using chat API from PHP code, GetChatUrl working fine and  immediately  i am calling RequestChat. this request chat action giving error.

      first i am calling GetChatUrl, based on the responce i am taking ChatUrl,ChatToken,SiteName.

      now i am calling another webservice by passing above values. but i am getting Operation Not Found error.

      what is the end point for RequestChat? is the below one is correct?

      sopa proj :http://sitename.custhelp.com/cgi-bin/interface.cfg/services/chat_soap?wsdl=server

      End point url : https://sitename.custhelp.com/cgi-bin/interface.cfg/services/chat_soap

      Thanks,

      Chakravarthy.

       

    • Robert Surujbhan

      Chakravarthy, the endpoint for the RequestChat operation (where its soap/xml can be posted) needs to be the URL you captured in the ChatUrl element from the GetChatUrl operation.  That is why you need to call GetChatUrl first. 

      In other words, call GetChatUrl like you are doing and extract the ChatUrl value from the response.  Use that value as the new endpoint when you call RequestChat.

    • Chakravarthy Elchuri

      First i used the GetURL as end point that time i got error message like

       <ns4:exceptionCode>ACCESS_DENIED</ns4:exceptionCode>
       <ns4:exceptionMessage>Site is not configured to allow access to the requested Web Services.</ns4:exceptionMessage>

      this means do i need to configure some thing?

       

      Thanks,

      Chakravarthy.

       

    • Cynthia Knox

      That means you do not have the proper configuration items set to allow the Chat API and/or Chat UQ API to connect.  Reach out to your Sales Consultant or Technical Account Manager or submit a request to ask for this to be enabled.

    • Chakravarthy Elchuri

      Is this licencing related?

    • Cynthia Knox

      I would suggest the best route is to submit a Service Request to get the answers you are looking for in regards to enabling this.

    • Chakravarthy Elchuri

      Understood... Its a licencing one.wink

    • Akash Singhal

      Hi All,

      Please help me with this issue.

      when I am hitting this SOAPENV its given an error like "Site is not configured to allow access to the requested Web Services"

      Request:
         <soapenv:Header>
            <v1:ChatClientInfoHeader>
               <v1:AppID>XX</v1:AppID>
             </v1:ChatClientInfoHeader>
         </soapenv:Header>
         <soapenv:Body>
            <v11:RequestChat>
               <v11:TransactionRequestData>
                  <v11:ClientRequestTime>2018-08-08 11:34:00</v11:ClientRequestTime>
                  <v11:ClientTransactionID>2</v11:ClientTransactionID>
                  <v11:SiteName>XX</v11:SiteName>
               </v11:TransactionRequestData>
               <!--Zero or more repetitions:-->
               <v11:CustomerInformation>
                  <!--Optional:-->
                  <v1:EMailAddress>XXXXX</v1:EMailAddress>
                  <!--Optional:-->
                  <v1:FirstName>XX</v1:FirstName>
                  <!--Optional:-->
                  <v1:LastName>XX</v1:LastName>
                  <v1:InterfaceID>
                     <!--Optional:-->
                     <v1:ID id="1"/>
                     <!--Optional:-->
                     <v1:Name>XXXX</v1:Name>
                  </v1:InterfaceID>
               </v11:CustomerInformation>
              <v11:ChatSessionToken>XXXXXX</v11:ChatSessionToken>
               </v11:RequestChat>
         </soapenv:Body>
      </soapenv:Envelope>

       

       

      Response:

      <detail>
                  <ns4:RequestErrorFault xmlns:ns4="urn:faults.chat.ws.rightnow.com/v1" xmlns="urn:messages.common.chat.ws.rightnow.com/v1" xmlns:ns2="urn:messages.uq.chat.ws.rightnow.com/v1" xmlns:ns3="urn:messages.enduser.chat.ws.rightnow.com/v1">
                     <ns4:exceptionCode>ACCESS_DENIED</ns4:exceptionCode>
                     <ns4:exceptionMessage>Site is not configured to allow access to the requested Web Services.</ns4:exceptionMessage>
                  </ns4:RequestErrorFault>
               </detail>

       

       

      Please help me ASAP.

       

    • Robert Surujbhan

      Akash, as mentioned in this post, you are receiving that message because the API is not enabled in your environment.  

      http://documentation.custhelp.com/euf/assets/devdocs/unversioned/Chat_APIs/Content/14.2/Chat%20APIs/API%20Manager/Administration.htm