1. Home
  2. Docs
  3. REST API
  4. Accessing the API
  5. Example Interactions

Example Interactions

Using FeedBlitz Functionality: Adding Email Services to Your Online Application

Say you want to embed FeedBlitz capabilities into an existing form on your web site.  You therefore need to present the FeedBlitz image verification test as part of your form, as the FeedBlitz REST API does not allow subscriptions or accounts to be created without passing the image verification test.

If this is all you want the API for, a much easier to build approach is to use the Simple API.

This is to prevent automated submissions from spambots, and is the approach used on the feedblitz.com web site.  Here’s how you would do it (all these examples assume that you authenticate properly to the API server):

  1. GET he /captcha resource to generate the challenge key and the path to the verification image.
  2. Insert these values into your form and create a field in your form to capture the user’s response.
  3. POST the response and other captcha / subscription / registration data back to the appropriate API resource.
  4. Check the return document for success, warning or failure codes.

If the image verification was passed and the API validated that the feed is available for subscriptions, then the user will have been added to the subscription and an appropriate activation email sent to then automatically by FeedBlitz.  If not, the returned document will contain another captcha challenge for you to present to the user.

This basic technique, depending on the resource you PUT to and the data delivered, enables you to:

  • Automatically start the subscription process for your site’s registrants, or
  • Automatically set up FeedBlitz email services for users of your application or service by creating a publication (syndication) account.

Adding Custom Validation to Email Signup

Say your site is required to validate the user’s age, but the out of the box validation question FeedBlitz provides is not enough. (e.g. to satisfy the US COPPA regulations you might want to verify a user’s age by having a form where they enter their birth date, rather than simply asking them to confirm they are 13 or over). For GDPR compliance, you might wan to add a consent conformation checkbox.

In this case you would present your own signup form, along with the FeedBlitz verification image as pulled using the API.  Once the user has passed your validation code from your custom form, you pass the email address and the response to the image verification challenge to the API to sign them up for your content.