fbpx

Create a zap with Zapier to add OTT users.

Overview

You can add users to your audience using our API endpoint.   In order to access our endpoints you will need an API key/secret.  Please contact us for an API key if you require.

Our endpoints all expect standard https POST type requests with data encoded into JSON.

Zapier

Adding new users

Setting up zapier.  Our example is using ninja forms, but zapier supports many other methods, including other forms systems, spreadsheets, etc.

  • Sign up for zapier.com (free)
  • Create a zap
  • step 1) trigger: ‘new Form Submission in Ninja Forms’
  • step 1) you’ll likely be asked to connect your zapier account with ninja forms
  • step 2) create your ‘action’, select webhooks by zapier, action event POST and edit its settings
  • step 2) setup the POST action
  • step 2) URL:  https://api.streamincinema.com/user/create
  • step 2) payload type  JSON
  • step 2) data  section,  username   choose-email-field-from-your-form
  • step 2) headers section,   x-api-key   enter-your-apikey-you-get-from-us

And test it.

Resetting passwords

Allowing users to reset their passwords (if forgotten)

Next you need to make sure your users can reset their passwords.   To do this you can do the same using zapier, or directly by posting to the endpoint

https://api.streamincinema.com/user/reset

 

CURL

A curl example is as follows:

#!/bin/bash
url=’https://api.streamincinema.com
key=’FESTIVAL-PRIVATE-KEY’
#All input is json
#All responses are json + response code, 2XX success, otherwise failure
#Create new user

#usernames must be valid email addresses, ie password etc are sent to the email address, invalid addresses will simply get lost
curl \
–header “Content-Type: application/json” \
–header “x-api-key: $key” \
–request POST \
–data ‘{“username”:”brian.quandt@gmail.com“}’ \
$url/user#Update users email address
curl \
–header “Content-Type: application/json” \
–header “x-api-key: $key” \
–request POST \
–data ‘{“username”:”brian.quandt@gmail.com“}’ \
$url/user/reset

Menu