Get Interaction Link API
This method is used to get the Interaction access link that is created for a specific campaign. The campaign can then be sent using your own SMS gateway.
Invoking the Method Using REST
URL Syntax and Example
http(s)://[host:port/internalPath]/Application Name/version/[version]/account/ [accountID]/resources/campaign/url/{CampaignId}
https://gointeract.io/interact/version/2/account/demoAccount/resources/campaign/url/campaign1
Specific URI Fields
URI Field | Data Type | Description |
---|---|---|
campaignId | string | Identifier for the relevant campaign. |
HTTP Method
POST
HTTP Headers
Tenant-Id: <account> Application-Key: <Public API Service application key> Content-Type: application/json Environment-Name: <environment-name>
HTTP Body
{ "additionalParams" :"var1=22&var2=33", "shortenUrl": true }
URI Field | Data Type | Description |
---|---|---|
additionalParams | string | Extra parameters to be passed in the URL, as required. (This field is optional.) |
shortenUrl | boolean | Determines whether or not to shorten the access URL. |
Sample Request
POST /interact/version/2/account/12345678/resources/campaign/url/ {CampaignId} HTTP/1.1 Host: localhost:8080 Tenant-Id: {tenantId} Application-Key: 53736e07e4b05772e6475c2d Content-Type: application/json Cache-Control: no-cache { "additionalParams" :"", "shortenUrl": false }
Expected Responses
Response Scenario | Status Code/Header | Example Message |
---|---|---|
Success | 200 | <campaign url> |
Invalid body parameter(s) | 400 | missing or invalid parameter <parameter> |
Invalid security headers | 401 "Unauthenticated-Reason" Header | { "code":"0x7000000", "message": "Request is unauthorized, missing or wrong credentials", "moreInfoUrl":"http://support.uniphore.com", } |
Campaign does not exist | 404 | Campaign <campaign id> was not found |
General error (internal error from the X‑Platform 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> Environment-Name: <environment-name>
Input Parameters
Parameter | Type | Description |
---|---|---|
campaignId | string | An identifier for the relevant campaign. |
additionalParams | string | Extra parameters to be passed in the URL, as required. |
shortenUrl | boolean | Determines whether or not to shorten the access URL. |
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:GetCampaignUrlRequest> <soap:campaignId>123</soap:campaignId> <soap:additionalParams>a=1&b=2</soap:additionalParams> <soap:shortenUrl>false</soap:shortenUrl> </soap:GetCampaignUrlRequest> </soapenv:Body> </soapenv:Envelope>
Expected Responses
Response Scenario | Example Message |
---|---|
Success | campaign URL (in XML format) |
Invalid body parameter(s) | <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Header/> <SOAP-ENV:Body> <ns2:GetInteractionUniqueIdResponse xmlns:ns2="http://com/jacada/interact/agent/soap"> <ns2:uniqueId>missing or invalid parameter <parameter></ns2:uniqueId> </ns2:GetInteractionUniqueIdResponse> </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> |
Campaign does not exist | <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Header/> <SOAP-ENV:Body> <ns2:GetInteractionUniqueIdResponse xmlns:ns2="http://com/jacada/interact/agent/soap"> <ns2:uniqueId>Campaign <campaign id> was not found</ns2:uniqueId> </ns2:GetInteractionUniqueIdResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope> |
General error (internal error from the X‑Platform Server) | exception (in XML format) |