Table of Contents

Getting Started

Authentication

As mentioned in the Getting Started Overview we provide two technology assets, Now let's delve deeper into the authentication.

We Suggest to Integrate our Apis with the Partner Backend, This can be achived using the following Authentication.

REST Api Authentication

We use Microsoft Identity Platform to retrieve the JWT using the OAuth2 protocol.

So you can retrieve the Token calling the follow Api REST:

curl --location 'https://login.microsoftonline.com/FLOWE_AZURE_TENANT/oauth2/v2.0/token' \
--form 'client_id="PARTNER_CLIENT_ID"' \
--form 'client_secret="PARTNER_CLIENT_SECRET"' \
--form 'scope="api://p1-FLOWE_TIER/.default"' \
--form 'grant_type="client_credentials"'

Further information at Microsoft Identity Platform Docs

The Token retrieved will contain all the permissions assigned to the Partner. Now the Partner can call our Apis using the token in a Bearer Authentication like following:

curl --location 'https://FLOWE_PREFIX_DNS_ENVIRONMENT.flowe.com/wp/FLOWE_GROUP_API_ROUTE/FLOWE_API_ROUTE' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer JWT_TOKEN' \
--header 'AuthKey: PARTNER_AUTHKEY' \
--header 'Partner: PARTNER_NAME' 

Message Broker Authentication

Using the same parameters (FLOWE_AZURE_TENANT, PARTNER_CLIENT_ID and the PARTNER_CLIENT_SECRET) you can get token and access to the Our Public Message Broker in which you will get Our Asynchronous Events.

Following an Example of C# Code

using Azure.Identity;
using Azure.Messaging.ServiceBus;

TokenCredential credential = new ClientSecretCredential(
    FLOWE_AZURE_TENANT,
    PARTNER_CLIENT_ID,
    PARTNER_CLIENT_SECRET);

var client = new ServiceBusClient(
    "FLOWE_PUBLIC_SERVICE_BUS.servicebus.windows.net",
    credential,
    options);

Once you have the ServiceBusClient instance you can Process Messages targeting topic PARTNER_NAME and subscription PARTNER_NAME.

Parameters to Access to the Environment (Sandbox/Test)

Contact Flowe to receive the following parameters:

Placeholder Description Provided by Flowe Admin
FLOWE_AZURE_TENANT Flowe Azure Tenant Id
PARTNER_CLIENT_ID Partner Client Id to get the Token
PARTNER_CLIENT_SECRET Partner Client Secret to get the Token
FLOWE_TIER Flowe Tier in which you are operating
FLOWE_PREFIX_DNS_ENVIRONMENT Flowe Prefix DNS based on the Tier
FLOWE_GROUP_API_ROUTE Flowe Group Api Route, Read the following table
FLOWE_API_ROUTE Flowe Api Route, Read it in Api Docs
JWT_TOKEN JWT Token Retrieved in the Auth Api Rest
PARTNER_AUTHKEY Partner Authentication Key
PARTNER_NAME Partner Name
FLOWE_PUBLIC_SERVICE_BUS Flowe Public Service Bus Namespace Endpoint

Set FLOWE_GROUP_API_ROUTE based on the following table:

Api Group Route Path Swagger File
Wallet Management walletmanagement/v1 File
Operations operations/v1 File
Partner Management partnermanagement/v1 File
Movements movements/v1 File
Fees Manager feesmanager/v1 File
Business Router businessrouter/v1 File