How to Call the Loqate API from a PCF Control in a Canvas App
Question details
The user wants to learn how to create and configure a Power Apps Component Framework (PCF) control that automatically calls the Loqate address API when typing the first three characters of a postal code in a Canvas App.

- Product
- Microsoft Power Apps
- Device & OS
- not provided
- Scenario
- Integrating a third-party address verification API into a Canvas App using a custom PCF component.
- Observed behavior
- The user needs to successfully pass input properties, trigger the API, and handle the authentication and output properties within the Canvas App environment.
Ensure you have obtained your Loqate API key from your account dashboard and have the Power Apps CLI installed in your development environment to create or import PCF controls.
Install and Configure a Custom Loqate PCF Control
Use this method to integrate the Loqate API by importing a custom PCF control directly into your Canvas App.
To call a third-party API like Loqate inside a Canvas App, you must build or install a PCF control that handles the API logic. PCF controls in canvas apps require explicitly defined inputs and outputs for API communication.
Use the Power Apps CLI to develop a new control or install a pre-built Loqate PCF plugin specifically designed for address verification.
Access the properties panel of the PCF control and input your Loqate API key. This step is necessary to implement authentication within the control.
In the control's manifest, define the necessary input properties (such as the postal code search string) and output properties (such as the returned address data) for smooth API communication.
Navigate to your Canvas App, click on 'Get more components', and import the configured PCF control as a custom code component. Add it to your desired app screen.
Set the input property of the PCF control to trigger the Loqate API call when the user enters the first three characters of a postal code into the designated text field.

Enhance Your Daily Productivity with WPS Office
While WPS Office does not natively build Power Apps PCF controls, it serves as a powerful, lightweight, and cost-effective alternative to the Microsoft Office suite. If you are looking to streamline your document, spreadsheet, and presentation tasks without hefty subscription fees, WPS Office is the perfect solution.

Frequently Asked Questions
Can I call a third-party API in a Canvas App without using a PCF control?
Yes. You can use Power Automate flows or create Custom Connectors to call third-party APIs like Loqate directly from a Canvas App. However, a PCF control is better suited if you need a deeply customized user interface alongside the API call.
Where can I find my Loqate API key?
Log into your Loqate account, navigate to your dashboard, and look for the 'API Settings' or 'API Keys' section to generate or copy your unique authentication key.
Why is my PCF control not showing up in the Canvas App component list?
This usually happens if the PCF feature is disabled in your environment. Go to your Power Platform Admin Center, select your environment, navigate to Settings > Features, and turn on the switch for 'Power Apps component framework for canvas apps'.




