VerticalResponse API  

Go Back   VerticalResponse API > VerticalResponse API > Partner

Notices

Partner Partner API access

Reply
 
Thread Tools Display Modes
  #1  
Old October 28th, 2009, 08:11 AM
DHanson DHanson is offline
Junior Member
 
Join Date: Oct 2009
Posts: 2
DHanson is on a distinguished road
Default Impersonation not being used

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
    ));
Thanks,
-David

Last edited by Allen Corona; October 28th, 2009 at 11:18 AM.
Reply With Quote
  #2  
Old October 28th, 2009, 11:22 AM
Allen Corona's Avatar
Allen Corona Allen Corona is offline
VR API Support
 
Join Date: Sep 2008
Location: San Francisco
Posts: 170
Allen Corona will become famous soon enoughAllen Corona will become famous soon enough
Default

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
Reply With Quote
  #3  
Old October 28th, 2009, 01:34 PM
DHanson DHanson is offline
Junior Member
 
Join Date: Oct 2009
Posts: 2
DHanson is on a distinguished road
Default

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
        )
    );
Reply With Quote
  #4  
Old October 30th, 2009, 03:08 AM
carlobee carlobee is offline
Member
 
Join Date: Jul 2009
Posts: 47
carlobee is on a distinguished road
Default

nice. thank you for that one!

Reply With Quote
Reply

Tags
impersonation

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 12:09 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright ©2008 VerticalResponse, Inc.