Seamless authorization (only for a standalone solution)

Enable smooth client sign-in from external CRMs to the B2COPY Web UI by retrieving a seamless authorization URL with the appropriate token for client login

Authorize a client as follows:

  1. Get the Secret Key and Redirect URL in the B2COPY Back Office. To do this:

  • Go to System > Settings in the B2COPY Back Office.

  • Navigate to the Side Auth section and copy values of the Secret Key and Redirect URL fields.

If the Secret Key field is empty, enter a value in the field and save it. Please note that editing other fields on the Settings page and saving changes may reset the Secret Key field to empty. If this occurs, enter a value into the field again.

Side Auth section in System > Settings
Side Auth section in System > Settings
  1. Use the following method to obtain the URL of the B2COPY Web UI to which a client from a third-party CRM must be redirected. The URL includes the token for client authorization in the B2COPY Web UI.

POST [host]/api/v1/standalone/auth/getAuthUrl

Request

Body

Name
Type
Required
Description

account_id

string

Yes

The MT login (number) of a client account.

secrete_key

string

Yes

The secrete key copied from the B2COPY Back Office.

investment_platform_id

string

Yes

The identifier of the investment platform instance.

  • If only one MT server is connected to your B2COPY investment platform, specify 1.

  • If you have more than one MT server connected to your B2COPY investment platform, contact the Support team for assistance.

Request example

curl --location --request POST 'https://host.name/api/v1/standalone/auth/getAuthUrl' \
--data-raw '{
  "account_id": "77632289",
  "secret_key": "Password1234!",
  "investment_platform_id": "1"
}'

Response

The response includes the URL for redirecting the client to the B2COPY Web UI, with the included token for seamless client authorization. The URL format must be as follows: https://{domain_name}/{token}.

Response example

{
  "status": 200,
  "meta": {
      "behaviours": [],
      "status": 200
  },
  "data": {
      "url": "https://my4.b2copy-demo.com/f5f9470def7b9b9b96b2427a6ebbd8c2"
  },
  "modules": []
}

Last updated

Was this helpful?