View Categories

Custom Integration

If you are a developer, you can make your own version of the on-page script to direct consumers to the Janus authentication modal. Ultimately what is needed is for your app to:

  1. Direct users to the Janus authentication modal with the correct ?callback parameter.
  2. Detect an ?auth authentication code in your URL parameter and run the gate execution functions.

For help with custom integration please join our Discord.

Auth Codes #

Authentication codes are provided to your web page through callback URLs after the consumer authenticates on the Janus validation portal. They will have a ?auth URL parameter, which you will need to detect and store in order to make the API call Get Payload. If the current window doesn’t have that parameter, you will want to dynamically generate a button/link to the Janus portal, which will redirect the user back to your page with the auth code.

Callback Links #

When your consumer needs to validate their wallet in Janus to get an auth code, provide a link to the Janus portal along with the ?callback parameter:

https://janus-auth.vercel.app/?callback=https://yourwebsite.com/your-page

OPS API Routes #

Janus is the name given to the API server that validates consumer wallets off-page in a form of the OAuth process. Routes you call for a custom on-page script will be at https://ngtr-api.onrender.com. If you want to create your own version of the Janus interface you’ll need to contact us for a partner API key.

All API call responses follow a general triple-point array format, [code, datapack, msg]

  • code: OK, FAIL, or ERROR
  • datapack: Varies widely by API call
  • msg: A general summary of the API response

Get Payload #

ROUTE

/ops/p/authcode/gate/wallet

authcode: The value found in the ?authcode callback parameter.

gate: Optional. A gate ID number. Must send as “0” if not using. The purpose of specifying a gate ID is when consumers are accessing Gate Collections and you want to curate the media that is seen on specific pages.

wallet: Optional. A standard Bech32 format Cardano wallet (not a stake address). See CIP-30 for obtaining addresses from browser wallets. Must send as “0” if not using.

FORMAT

FETCH (GET)

No form body.

RESPONSES

Success: #

[OK, [Payload, Gate], msg]

Payload Example:

{
  gatekey_returnformat: "S_YOUTUBE",
  gatekey_payload: "6MXIXE_mM7A",
  account_id: "MFbJcw5OLfoCxP2yoTnsIXjVZQN34C",
  gatekey_serial: "BLyXFbTkrrzYjvqoJgL9rdpmmhPntP"
}

Gate Example:

{
   "gatekey_thumb":"https://ngtr.nyc3.digitaloceanspaces.com/gate_default.jpg",
   "events":[ids...],
   "collections":[ids...],
   "gatekey_description":"Description",
   "domain_url":"https://nessieclub.vercel.app/test-page.html",
   "gatekey_serial":"fuYCtfaCe2brFrLFvx2ckrUACKTr4E",
   "utility_category":"Tickets",
   "gatekey_title":"New Test Gate",
   "expiry":"(Date)",
   "min_qty":"(Integer)",
   "account_id":"74cKMYbHfXNR7i6E6Wkym86XXUCPVQ",
   "asset_id":"(trigger asset fingerprint)",
   "policy_id":"(trigger asset policy)",
   "asset_cap":"(Integer or null)",
   "use_cap":"(Integer or null)",
   "gatekey_status":"GOOD",
   "gatekey_active":"ACTIVE", 
   "publicity": "PUBLIC"
}

Please return to this page later as we build out the documentation. We will lay out the baseline API calls made by the script so that developers are able to make their own version of the Janus authentication portal.