SOAP Call for Transactional emails using Postman | Community
Skip to main content
November 2, 2023
Solved

SOAP Call for Transactional emails using Postman

  • November 2, 2023
  • 2 replies
  • 1972 views
I am just getting an error here:

curl --location 'https://URL-here.com/nl/jsp/soaprouter.jsp' \
--header 'Content-Type: text/xml; charset=utf-8' \
--header 'SOAPAction: nms:rtEvent#PushEvent' \
--data-raw '<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<tns:PushEvent xmlns="urn:nms:rtEvent">
<tns:sessiontoken>Pasted session token here</tns:sessiontoken>
<tns:domEvent>
<rtEvent xmlns="" type="TESTPLATFORM" email="test@gmail.com" wishedChannel="email" externalId="1234">
<ctx></ctx>
</rtEvent>
</tns:domEvent>
</tns:PushEvent>
</soap:Body>
</soap:Envelope>'

 

 

but I am getting this error:

 <SOAP-ENV:Fault>
            <faultcode>SOAP-ENV:Server</faultcode>
            <faultstring xsi:type='xsd:string'>SOP-330011 Error while executing the method 'PushEvent' of service 'nms:rtEvent'.</faultstring>
            <detail xsi:type='xsd:string'>XTK-170060 You do not have the rights needed to complete the operation. You must have access to a folder of type 'Real time events' (nmsRtEvent).
XTK-170006 Unable to parse expression 'DefaultFolder('nmsRtEvent', [@_folder-id])'.
XSV-350023 Unable to save document of type 'Real time events (nms:rtEvent)'.</detail>
        </SOAP-ENV:Fault>
 
 
 

Am I creating a good postman request to trigger a transaction email template with the trigger 'TESTPLATFORM'? 
Is the SOAP Action correct here?
is it some access issue? I am using admin account
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Manoj_Kumar

I got the session token using this call:


curl --location 'https://domain/nl/jsp/soaprouter.jsp' \
--header 'Content-Type: text/xml; charset=utf-8' \
--header 'SOAPAction: xtk:session#Logon' \
--data '<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<tns:Logon xmlns="urn:xtk:session">
<tns:sessiontoken></tns:sessiontoken>
<tns:strLogin>myusername</tns:strLogin>
<tns:strPassword>mypassword</tns:strPassword>
<tns:elemParameters/>
</tns:Logon>
</soap:Body>
</soap:Envelope>
'


Hello @rohanju 

 

There is an operator explicitly created for the message centre. You will have to use the credentials of that operator to generate a session token.

 

The operator username is usually mc

 

Check the list of all operators in your instance. Use the credentials for the mc operator, and it will work.

 

More information on this is available here: Configure instances | Adobe Campaign

2 replies

SatheeskannaK
Community Advisor
Community Advisor
November 2, 2023

@rohanju Is this for adobe campaign classic?

Thanks, Sathees
RohanJuAuthor
November 2, 2023

Yeah, Campaign Classic

RohanJuAuthor
November 2, 2023

This is the request that I am making now:

curl --location 'https://URL-here.com/nl/jsp/soaprouter.jsp' \
--header 'Content-Type: text/xml; charset=utf-8' \
--header 'SOAPAction: nms:rtEvent#PushEvent' \
--data-raw '<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<tns:PushEvent xmlns="urn:nms:rtEvent">
<tns:sessiontoken>Pasted session token here</tns:sessiontoken>
<tns:domEvent>
<rtEvent xmlns="" type="TESTPLATFORM" email="test@gmail.com" wishedChannel="email" externalId="1234">
<ctx></ctx>
</rtEvent>
</tns:domEvent>
</tns:PushEvent>
</soap:Body>
</soap:Envelope>'

 

 

but I am getting this error:

 <SOAP-ENV:Fault>
            <faultcode>SOAP-ENV:Server</faultcode>
            <faultstring xsi:type='xsd:string'>SOP-330011 Error while executing the method 'PushEvent' of service 'nms:rtEvent'.</faultstring>
            <detail xsi:type='xsd:string'>XTK-170060 You do not have the rights needed to complete the operation. You must have access to a folder of type 'Real time events' (nmsRtEvent).
XTK-170006 Unable to parse expression 'DefaultFolder('nmsRtEvent', [@_folder-id])'.
XSV-350023 Unable to save document of type 'Real time events (nms:rtEvent)'.</detail>
        </SOAP-ENV:Fault>
Manoj_Kumar
Community Advisor
Community Advisor
November 3, 2023

Hello @rohanju 

 

As the error says, You don't have permission to access the folder 'Real time events'.

 

You should be using the MC operator to generate the session token for this API call. Token generated by another operator might not work.

Manoj     Find me on LinkedIn
Manoj_Kumar
Community Advisor
Manoj_KumarCommunity AdvisorAccepted solution
Community Advisor
November 4, 2023

I got the session token using this call:


curl --location 'https://domain/nl/jsp/soaprouter.jsp' \
--header 'Content-Type: text/xml; charset=utf-8' \
--header 'SOAPAction: xtk:session#Logon' \
--data '<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<tns:Logon xmlns="urn:xtk:session">
<tns:sessiontoken></tns:sessiontoken>
<tns:strLogin>myusername</tns:strLogin>
<tns:strPassword>mypassword</tns:strPassword>
<tns:elemParameters/>
</tns:Logon>
</soap:Body>
</soap:Envelope>
'


Hello @rohanju 

 

There is an operator explicitly created for the message centre. You will have to use the credentials of that operator to generate a session token.

 

The operator username is usually mc

 

Check the list of all operators in your instance. Use the credentials for the mc operator, and it will work.

 

More information on this is available here: Configure instances | Adobe Campaign

Manoj     Find me on LinkedIn