Differences

This shows you the differences between two versions of the page.

web_api:reseller:auto_login [2010/07/26 15:23] (current)
Jose Lopez created
Line 1: Line 1:
 +====== Autologin ======
 +Why bother reinventing the wheel when you can let your subusers manage their account from your website directly?  Here we allow you to create an iframe to our site.
 +
 +
 +===== Initial API Call =====
 +In order to login your user, you need to contact our web API to retrieve the unique URL to automatically login your user.  Then display the generated URL to automatically login your subuser.
 +
 +
 +^ Parameter ^ Required ^ Requirements ^ Description ^
 +| user      | <html><span style="color:#FF0000">Required</span></html> | The value must be set in email format. | This is the subuser you will attempt to automatically login. |
 +
 +==== XML ====
 +**Command**
 +<code>
 +https://sendgrid.com/api/user.geturl.xml?api_user=youremail@domain.com&api_key=secureSecret&user=subuser@example.com
 +</code>
 +
 +**Return - Success**
 +<code xml>
 +<params>
 +  <params>al_username=youremail@domain.com&amp;al_subuser_name=subuser@example.com&amp;al_hash=b478ab36ebc306990dd283b1c341898e</params>
 +</params>
 +</code>
 +
 +==== JSON ====
 +**Command**
 +<code>
 +https://sendgrid.com/api/user.getuserurl.json?api_user=youremail@domain.com&api_key=secureSecret&user=subuser@example.com
 +</code>
 +** Return - Success **
 +<code>
 +{"params":"al_username=youremail@domain.com&al_subuser_name=subuser@example.com&al_hash=aa39649af578679d3a90d2cc43245d56"}
 +</code>
 +
 +===== iFrame Usage =====
 +Once you have received the unique URL to login your subuser, simply place this URL as URL source to the iFrame.  You can use any url on the site a regular user would.
 +
 +<code html>
 +<iframe src="https://sendgrid.com/account/wizard/page/1?al_username=youremail@domain.com&al_subuser_name=subuser@example.com&al_hash=aa39649af578679d3a90d2cc43245d56" ></iframe>
 +</code>
 +
 +**Sample Screenshot**
 +<html><center></html>{{:autologin.png}}<html></center></html>
 
web_api/reseller/auto_login.txt · Last modified: 2010/07/26 15:23 by Jose Lopez
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki