This method creates a token that is used to uniquely identify calls when sharing data among APIs. The method returns an identifier (token). 

Note: This API must be called before calling any other Deflected Calls Report APIs.

Invoking the Method Using REST

URL Syntax and Example

http(s)://[host:port/internalPath]/Application Name/version/[version]/account/ [accountID]/generateToken 

https://gointeract.io/interact/version/2/account/12345678/generateToken

Specific URI Fields
None

HTTP Method
GET

HTTP Headers

Tenant-Id: <account>
Application-Key: <Public API Service application key>

When working in a Multi Environment configuration, the Header must include the name of the current environment:

Environment-Name: <environment-name>

HTTP Body
None

Sample Request

GET/interact/version/2/account/12345678/generateToken HTTP/1.1
Host: localhost:8080
Tenant-Id: {tenantId}
Application-Key: 53736e07e4b05772e6475c2d
Content-Type: application/json
Cache-Control: no-cache

Expected Responses

Response Scenario Status Code/Header Example Message
Success 200 7 alphanumeric characters
{
"token":"Aejhib7"
}
Invalid security headers 401
"Unauthenticated-Reason" Header
{
"code":"0x7000000",
"message": "Request is unauthorized, missing or wrong credentials",
"moreInfoUrl":"http://www.jacada.com/support",
}
General error (internal error from the Interact server) 500 exception

Invoking the Method Using SOAP

WSDL URL
https:/gointeract.io/interact/version/2/agent/soap/agent.wsdl

Headers

Tenant-Id: <account>
Application-Key: <Public API Service application key>

When working in a Multi Environment configuration, the Header must include the name of the current environment:

Environment-Name: <environment-name>

Input Parameters
None

Sample Request

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap="http://com/jacada/interact/agent/soap">
<soapenv:Header/>
<soapenv:Body>
<soap:GenerateTokenRequest/>
</soapenv:Body>
</soapenv:Envelope>

Expected Responses

Response Scenario Example Message
Success <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP-ENV:Header/>
    <SOAP-ENV:Body>
        <ns2:GenerateTokenResponse xmlns:ns2="http://com/jacada/interact/agent/soap">
            <ns2:token><token></ns2:token>
         </ns2:GenerateTokenResponse>
     </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Invalid security headers <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP-ENV:Header/>
     <SOAP-ENV:Body>
        <SOAP-ENV:Fault>
            <faultcode>0x7000000</faultcode>
            <faultstring>Request is unauthorized, missing or wrong credentials</faultstring>
        </SOAP-ENV:Fault>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
General error (internal error from the Interact server) exception (in XML format)

Revision:

Comments