Account Registration and Subscription Signup
Resource path: /user
The /user resource has three distinct uses:
- To retrieve information about the authenticated user
- To register a new account at FeedBlitz
- To start the new subscription signup process
GET – About the Current User
Returns information about the current logged on user.
<?xml version="1.0" encoding="utf-8" ?> <feedblitzapi version="1.0" xmlns:xlink="http://www.w3.org/1999/xlink"> <rsp stat="ok"> <success code="0" msg="Authorized" /> </rsp> <user> <id>123</id> <email>email@example.com</email> <mailformat>HTML</mailformat> <keepprivate>0</keepprivate> <status>ok</status> <created>2005-08-01 22:23:00 -0500</created> <ip>188.8.131.52</ip> <failcount>0</failcount> <bounces /> </user> </feedblitzapi>
|<id>||The user’s unique identifier within FeedBlitz|
|<email>||The user’s email address|
|<keepprivate>||1 if the user is set to be reported to publishers as anonymous, 0 otherwise|
|<status>||ok / pending / undeliverable / deleteme / deleted / unsubscribed|
|<created>||Date the ID was created|
|<ip>||IP from which the user was created. May be an octet or “Imported by:” and text describing the source of the address.|
|<mailformat>||The literal: HTML or TEXT|
|<failcount>||Number of bounces received. Used for soft bounce processing (hard bounces send the user to the “deleteme” state, from which they are set to “deleted” nightly.)|
|<bounces>||Number of consecutive delivery failures as recorded by the FeedBlitz servers. A successful delivery resets this value to zero (i.e. an empty tag).|
There is exactly one user if the caller authenticates: the caller themselves.
POST – Updating the Current User
The current user may change any of their settings (except their ID) by posting the XML to the /user resource.
Important: If you set the current user’s state to “deleted” they will no longer receive updates, but their syndications will remain intact (so that their subscribers will continue to receive campaign updates). This is by design: should the list owner’s email address become undeliverable and then removed by the system (i.e. set to “deleted”), it is unreasonable to terminate their subscribers and lists as well.
A user who successfully logs in to either the GUI or the API will have their status restored if it is not ok.
To remove a user AND their syndications AND their subscribers, you need to DELETE the user using the DELETE method (see below).
PUT – Registering a New User Account
To register a new user and start the authentication process via the email activation link, PUT the XML document to the /user resource (API callers must authenticate with a different ID). A valid captcha entry MUST be part of the XML document sent to the resource, as follows:
<?xml version="1.0" encoding="utf-8" ?> <feedblitzapi version="1.0" xmlns:xlink="http://www.w3.org/1999/xlink"> <user> <email>firstname.lastname@example.org</email> <password>sekret</password> <keepprivate>0</keepprivate> <mailformat>TEXT</mailformat> <ip>184.108.40.206</ip> <captcha> <random>123</random> <response>what_the_user_typed</response> </captcha> </user> </feedblitzapi>
If the image verification fails (i.e. the <response>is incorrect) you will be returned a fresh captcha that must be used in the next attempt.
If the registration fails (because the user already has an account) then a warning or error status will be returned indicating the nature of the problem.
Regardless, the returned document will only contain the email you attempted to register; it is NOT the same as a GET for that user. This preserves privacy and security settings that the extant user may have in place. Also note that a PUT to an existing user is NOT the same as a POST – you may only use PUT to create a new user. Callers must POST to update an account’s settings.
If the PUT is successful the user will be sent an activation email. You may neither use the API nor the FeedBlitz GUI using the new account’s credentials until the user has activated their account using the link in the confirmation email. If the link must be resent the user must use the lost password facility at feedblitz.com
PUT – A New Subscription to an Existing Syndication
This operation mimics the effect of the user adding their email to your FeedBlitz signup form. The process is similar to creating a new account, except in this case there is a subscription entity in the user XML as well as the captcha.
You do not need to know the user’s FeedBlitz ID; the email address will be used. The subscription’s list ID is required however, as in the following XML:
<?xml version="1.0" encoding="utf-8" ?> <feedblitzapi version="1.0" xmlns:xlink="http://www.w3.org/1999/xlink"> <user> <email>email@example.com</email> <captcha> <random>123</random> <response>what_the_user_typed</response> </captcha> <subscription> <id>1234</id> <referer>http://foo.com/signup.html</referer> <ip>220.127.116.11</ip> </subscription> </user> </feedblitzapi>
You may have multiple <subscription> blocks in the XML to sign a user up for multiple options (e.g. a daily and a weekly summary). Review the returned XML carefully for errors.
If the email address exists in FeedBlitz already, an email will be sent to the user inviting them to confirm their subscription, unless single opt-in is an option. If not, an account will be created and then the activation email sent. Like the PUT above, the only returned user information will be the email address supplied by the caller, and a PUT is not the same as a POST – a PUT on an existing user will not update that user’s information (such as their password).
DELETE – Deleting a User
The delete method not only marks the user as deleted, it also suspends all the user’s mailing lists and campaigns, as well as their subscriptions.