Integration with External Auth Providers

There are cases, when your website already has a social login or some form identity management in place. If this is the case, there is no need to replace authentication provider, but including a simple webhook like call to Tradable Bits will allow us to track properly identity of the user and target them properly in the system. Same approach can be taken, when integrating with native mobile apps

Call will require following arguments

args = {"network":"facebook",
            "access_token" : xxxx,
            "device_network": "ios",
            "device_id": "xxx" }"",args)
For more details, please check API documentation

Integration with Websites for Festivals

Tradable Bits Platform consumes fan data from various sources and Festival Website is very important source to be ignored. Social Login, Schedule, and ability to create personal schedule are highly expected and used features, so our API allows fully integrate and build entire user experience without having to resort to building full development Environment.

Terms and Values we will reference in the example Link to your Festival Website Authentication Callback, which will handle authentication
Python Server Side language used in the example. Obviously, you're not restricted to stay with python
facebook Login Network Used in the example. Almost all most common networks can be used for Oauth including plain email registration. For Simplicity we reference Facebook Auth Here
api_secret API Secret will be required to map back "code" from callback to session_uid, which can be used in the API
api_key As per our reference, api_key is used for call with RESTful API together with session_uid

Social Login Integration

There is more than one way to integrate authentication into website. In this example we will utilize OAUTH mechanism. Javascript SDK is also available and can be used if desired.

First, you need to add links with social auth on your website:

<a href=""> Connect with FB </a>
<a href=""> Connect with Spotify </a>
On your Auth Call back Code, redirect will include code

def process_response(request):
    code = request.GET.get('code')
    error = request.GET.get('error')
    if error is not None:
    elif code is not None:
        code = request.GET.get('code')
        api_key = "12345"
        account_id = "12345"
        redirect_url = ""
        parms = {"code":code,"api_key":api_key,"account_id":account_id,"redirect_url":redirect_url}
        token_url = "" % urllib.urlencode(parms)
        with contextlib.closing(urllib2.urlopen(token_url, timeout=10)) as r:
            res =
            session = json.loads(res)
        session_uid = session['session_uid']
        fan_id = session['fan_id']

With Valid session_uid, you can start querying API for the list of artists in the line up and optionally their schedules
Idols and Line up
Existing Artists for the line up can be retrieved with public key
url = ""
Existing Events for the festival
url = ""
Fetching list of liked idols
url = "" + session_uid + "/idols?api_key=xxxxx&label_name=myfest2019"
Fetching list of liked events
url = "" + session_uid + "/fan_events?api_key=xxxxx&label_name=myfest2019"
Adding Event into "liked"

url = "" + session_uid + "/fan_events?api_key=xxxxx"
args = {"action":"add","event_uid": "xxxx"},args)
Adding Idol into "liked"

url = "" + session_uid + "/idols?api_key=xxxxx"
args = {"action":"add","idol_uid": "xxxx"},args)