DMXzone App Connect Support Product Page

How to Setup/Hook in Custom API with Token-based Authentication?

Asked 01 Jun 2018 19:42:30
has this question
01 Jun 2018 19:42:30 Anthony Williamson posted:

I'm currently working on a mobile app (iOS & Android), to be packaged for the app stores only.

I'm wondering if perhaps someone with experience setting up a custom API with DMXzone extensions might be able to point me in the right direction, either with advice, documentation, videos, or a combination?

Basically the API should work like this: (The following links to the API are fake, but the methods are real)

The first screen of the app will be the login screen (with email address and password input fields, and a sign in button)
  • Request - ms1:
  • Response: [0," "]
  • Request - ms2: &password=fake-password
  • Response: [0,"Token…"]

The second response should be a unique auth token that can be used to access JSON data, such as “method=card-list&token=”, which is called just after login and returns a list of cards for the next screen.

With that card list data (and for each user), there is a secondary security token provided by the API. Here is an example of one of the card list users returned JSON data:

        "card_secure_ssl": "d1VwQkdMRjB3aXhtM0F3Q0kvMi9TR0tPWlBYRDJ5WUgxckQyTlFMdUtTRT0=",
        "card_last_4": "1241",
        "cardholder": "DEPARTMENT, IT",
        "period_avail": "1000.00",
        "card_status": "B"

These would be used to dynamically populate a list of cardholders on the page, and each cardholder instance would then link out to another page that dynamically pulls in the specific cardholder’s data. So on and so forth…

There are only 10 methods used by the API. The API is undocumented, meaning there is no API spec file, but it works perfectly.

Does anyone have any insights how I might setup the API to work like this on a mobile app project using Visual App Designer for Framework7, and other DMXzone Dreamweaver extensions? I have a monthly subscription, so I should be good on whichever ones I need to be using.


Reply to this topic