When using the token authentication, you can simply send a request to us using your application token and the user token and base URL (when needed). This will allow you to authenticate users without having to send them throught the authenticator, with every API request that you send.

There are a few reasons why you may want to use this approach over the magic link

  • You want to test Kariz for existing users that you have already authenticated with

  • You want to keep your own style for the authentication flow

  • You don’t want to reauthenticate existing users

This authentication method allows you to circumvent these use cases and still use our fully maintained unified API as part of your process.

How it works

  1. Get the existing user credential for a marketplace (usually stored in your app database)

  2. Send us a request to get data for that customer on one of our marketplaces

The request can be anything, like get orders or get products. If you want to authenticate using this method it is important that your include some additional parameters in the request. These are based on what the application needs to handle the authentication and differ per channel. Below is listed what parameters we need for each channel to authenticate your users.

Channels:

In the configuration, the scopes that are being used are called channels.

  • Shopify

  • Bol.com

  • Amazon

  • WooCommerce

Shopify parameters

NameRequiredData typeDescriptionExample
baseUrlIf user is not authenticated with magic linkStringShop URLshop_name.myshopify.com
TokenIf user is not authenticated with magic linkStringOAuth 2.0 token

Sample Json:

{
  "params": {
    "shopify": [
      {
        "key": "baseUrl",
        "value": "shop_name.myshopify.com"
      },
      {
        "key": "token",
        "value": "oauth token"
      }
    ]
  }
}

woocommerce parameters

NameRequiredData typeDescriptionExample
baseUrlIf user is not authenticated with magic linkStringFull shop URLhttps://domain.com/wordpress/wp-json
TokenIf user is not authenticated with magic linkStringBasic Auth tokenbase64

Sample Json:

{
  "params": {
    "woocommerce": [
      {
        "key": "baseUrl",
        "value": "https://domain.com/wordpress"
      },
      {
        "key": "token",
        "value": "base64 token"
      }
    ]
  }
}

bol parameters

NameRequiredData typeDescriptionExample
TokenIf user is not authenticated with magic linkStringBasic Auth tokenbase64

Sample Json:

{
  "params": {
    "bol": [
      {
        "key": "token",
        "value": "base64 token"
      }
    ]
  }
}