![]() |
|
#1
|
|||
|
|||
|
We are able to log in to the API with our main account, create campaigns and lists, and send them. However, if we try to specify a client's subaccount with the "impersonate_user" parameter it appears to be ignored; all campaigns and lists still go to our root account. I have noticed that we are able to login in with or without the certificate; does this indicate anything?
PHP code: Code:
$wsdl = "https://api.verticalresponse.com/wsdl/1.0/VRAPI.wsdl";
$vr = new SoapClient( $wsdl, array() );
$session_id = $vr->login(array(
'username' => $user,
'password' => $pass,
'session_duration_minutes' => 3,
'impersonate_user' => $client_email
));
-David Last edited by Allen Corona; October 28th, 2009 at 11:18 AM. |
|
#2
|
||||
|
||||
|
DHanson,
The code that you are put in the thread has two issues. The first one is that you are using the Enterprise WSDL, you will need to use the Partner WSDL (https://api.verticalresponse.com/par...1.0/VRAPI.wsdl). The second issue with the code is that you are not passing the SSL certificate or the passphrase. It should be the second parameter when you instantiate the SoapClient object. If you look at the sample code, it should include information on specifically what you need to pass. - Allen Corona
__________________
Allen Corona VR API Support |
|
#3
|
|||
|
|||
|
Allen, that was it, thank you for your help. For anyone else looking (basic version):
Code:
$vr = new SoapClient(
'https://api.verticalresponse.com/partner-wsdl/1.0/VRAPI.wsdl',
array(
'local_cert' => 'absolute/path/certificate.pem',
'passphrase' => 'passphrase'
)
);
$session_id = $vr->login(
array(
'username' => $your_email,
'password' => $password,
'session_duration_minutes' => 3,
'impersonate_user' => $client_email
)
);
|
|
#4
|
|||
|
|||
|
nice. thank you for that one!
|
![]() |
| Tags |
| impersonation |
| Thread Tools | |
| Display Modes | |
|
|