API URL and connection configuration

Set the CRM installation URL in lib/app/constants.dart:

static const String baseUrl = 'https://crm.example.com';

If Perfex is installed in a subdirectory, include it:

static const String baseUrl = 'https://example.com/crm';

Use your own address in place of these examples. Do not include a trailing slash, /admin, /clients, or /flutex_customer_api/v1.

How the address is used

lib/core/network/dio_provider.dart appends /flutex_customer_api/v1. For the first example, the config request goes to:

https://crm.example.com/flutex_customer_api/v1/config

Verify the connection

  1. Open the CRM URL from the test device’s browser.
  2. Open the full config URL and confirm a JSON response.
  3. Rebuild or fully restart the app after changing the constant.
  4. Sign in with a test customer contact and load the dashboard.

Use a valid HTTPS certificate. Do not solve certificate failures by disabling certificate validation. A development computer’s localhost address does not point to that computer from a separate phone.

If public configuration works but customer data does not, check the module license, contact credentials, and permissions. Do not add a generic Perfex API key: this module uses its own contact-based authentication flow.

Write Your Comment