Overview

Using our SDKs, you can integrate FegoConnect into your existing application. Currently, we support the Web SDK, and we'll soon support Android and iOS SDKs as well.

Integration Steps

  • To initiate the FegoConnect Account Aggregator, you need to create a customer at Fego using the Create Customer API

  • You can get your clientId and secret from the Sandbox Console -> API Key Manager. Make sure to subscribe in the product selection for FegoConnect -> Account Aggregator

  • UserId is your customer's phone number

  • You will get the Fego Customer ID in the response. This Fego Customer ID will be used to access FegoXP and FegoIntel APIs.

  • Use our SDKs to initiate the Account Aggregator onboarding process

SDKs

  • Web - Live

  • iOS - Upcoming

  • Android - Upcoming

Web SDK

Configuration

You need to configure the Webhook URL and the Redirection URL in the Sandbox Console -> Customizer

Fego will send a notification to your endpoint at the webhook URL when the data is ready to be fetched after the consent is given. And Fego will redirect the user to your site at the Redirection URL.

Note: FI data fetch Webhook may take some time to deliver after the redirection is made. So the user needs to be shown a waiting screen

Create Customer

POST https://sandbox.fego.ai/sandbox-service/v1/customer

Request Body

{
    "clientId": "your-client-id",
    "secret": "your secret key",
    "userId": "your_unique_user_id"
}

Response Body

{
    "entity": {
      "customerId": "fego_customerId"
    },
    "status": "SUCCESS",
    "message": "OK",
    "responseCode": 200
}

You have to create a customer at Fego and store the Customer ID customerId in your database for future use like Insights API or Experience API

Try this API Create Customer

Create Redirection URL

POST https://sandbox.fego.ai/sandbox-service/v1/auth/sdk

Request Body

{
    "module": "AA_ONBOARDING",
    "customerId": "fego_customerId",
    "clientId": "your-client-id",
    "secret": "your-secret-key",
}

Response Body

{
    "entity": "https://connect.fego.ai/auth?token=sample-token",
    "status": "SUCCESS",
    "message": "OK",
    "responseCode": 200
}

Try this API FegoConnect redirect URL

The entity in the response is the FegoConnect URL for which you have to redirect the user and the FegoConnect Account Aggregator journey will begin.

Redirection

Once the user completes the data sharing consent, the user will be redirected back to this URL which you have set in the Configuration steps.

Webhook

Once the consumer provides the consent, the FIP will prepare the data. And once the data is ready, you will receive a webhook to the endpoint that you have set in the Configuration steps.

Webhook Request

{
    "customerId": "fego_customerId",
    "status": "READY|FAILED"
}

Webhook Response

Once you receive the above request you will have to return 200 status code with the following json response

{
    "status": "SUCCESS"
}