BigCommerce - Hosted Ecommerce Software by Interspire

Interspire Forum

 
Go Back   Interspire Forum > Interspire Email Marketer Community Forum > Customization and Integration

Reply
 
Thread Tools Display Modes
  #1  
Old 10-11-2013, 05:56 AM
tsm + tsm is offline
Interspire Customer
 
Join Date: Oct 2013
Posts: 2
Default User Account Creation Based on a Trigger/Call

We are looking at the ability to automatically create User Accounts based on a Trigger of some sort, an API call or by invoking a function perhaps, and then send parameters along with it.

Does IEM have this functionality?
Can somebody who has knowledge please point me to the right direction?

Hopefully I wouldn't have been the only person who wanted this feature.

Best regards,

Luminaire
Reply With Quote
  #2  
Old 10-15-2013, 03:54 PM
Teneo + Teneo is offline
Interspire Customer
 
Join Date: Feb 2009
Location: Brugges
Posts: 630
Default

Use Interspire XML API to do this

Code below :

PHP Code:
<?php

$url 
'http://localhost/emailmarketer/xml.php';

$username 'admin';
$token '';


/*// Optional fields:

'trialuser'

'gettingstarted'
'status'
'textfooter'                    
'htmlfooter'                    

'admintype'                        
'listadmintype'                    
'segmentadmintype'                
'templateadmintype'                

'smtpserver'                    
'smtpusername'                    
'smtppassword'                    
'smtpport'                        

'infotips'
'usewysiwyg'                    
'enableactivitylog'                

'editownsettings'                

'xmlapi'                        
'xmltoken'                        

'googlecalendarusername'        
'googlecalendarpassword'        

'user_language'                    

'adminnotify_email'                
'adminnotify_send_flag'
'adminnotify_send_threshold'    
'adminnotify_send_emailtext'    
'adminnotify_import_flag'
'adminnotify_import_threshold
'adminnotify_import_emailtext'

//Admin types:
// c = custom
// a = admin
// blank = non admin
*/

$xml_data '
    <xmlrequest>
        <username>' 
$username '</username>
        <usertoken>' 
$token '</usertoken>
        <requesttype>user</requesttype>
        <requestmethod>createnewuser</requestmethod>
        <details>
            <groupid>1</groupid>
            <username>test</username>
            <password>test</password>
            <fullname>test account</fullname>
            <emailaddress>email@domain.com</emailaddress>
            <usertimezone>GMT-6:00</usertimezone>
        </details>
    </xmlrequest>
    '
;

$ch curl_init();
curl_setopt($chCURLOPT_URL$url);
curl_setopt($chCURLOPT_RETURNTRANSFERtrue);
curl_setopt($chCURLOPT_FAILONERRORtrue);
curl_setopt($chCURLOPT_POSTtrue);
if (!
ini_get('safe_mode') && ini_get('open_basedir') == '') {
    
curl_setopt($chCURLOPT_FOLLOWLOCATIONtrue);
}
curl_setopt($chCURLOPT_TIMEOUT10);

curl_setopt($chCURLOPT_POSTFIELDS'xml=' $xml_data);

$pageData curl_exec($ch);

if (!
$pageData) {
    echo 
"Error!: " curl_error($ch);
    echo 
"\n";
    exit;
}
curl_close($ch);

echo 
$pageData "\n";

?>
__________________

PROMO : Signup today for our SMTP Relay services and receive a free license of our MPS Addon !

Bram Van Daele

TENEO SMTP relay services
http://esp.teneo.be

(Contact me directly)
Reply With Quote
  #3  
Old 10-16-2013, 12:53 AM
tsm + tsm is offline
Interspire Customer
 
Join Date: Oct 2013
Posts: 2
Default

Hi Teneo,

Thanks for your reply.

I tried the code you posted and replaced $url, $username and $token with valid values and got this reply:

"FAILED Invalid parameters specified to use this function."

After that, I changed the value of request method

from: createnewuser
to : Create

Now I get the reply:

"FAILED"


I am using IEM v6.1.3
Where did you find this information as I wasn't able to read about it in the XML Api Documentation?

Thanks and regards.

Luminaire
Reply With Quote
Reply

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 On

Forum Jump