Skip to main content
All CollectionsBatchDataAddress Autocomplete SDK
Address Auto-Complete Library Integration: CORS Issue Resolution Guide
Address Auto-Complete Library Integration: CORS Issue Resolution Guide
R
Written by RevOps
Updated over 2 months ago

Overview

This document provides step-by-step instructions for web developers facing Cross-Origin Resource Sharing (CORS) issues while integrating our address auto-complete library into their local development environment. By following these steps, you'll be able to overcome CORS restrictions and seamlessly integrate the library for a smooth development experience.

Prerequisites

  • Ensure that you have access to the BatchData app.

  • Make sure you have the required permissions to create a new client token.

Step1: Generate Client Token

  1. Open the BatchData app.

  2. Navigate to Token -> Client Side Tokens.

  3. Click on "Add New Client Token."

Step 2: Whitelist Local IP

  1. In the client token settings, locate the "Hostname" field.

  2. Add "127.0.0.1" to whitelist this IP.

  3. Generate the token.

Step 3: Install CORS Chrome Extention

  1. Open the Chrome browser.

  2. Go to the Chrome Web Store and install the "Allow CORS: Access-Control-Origin" extension.

  3. Once installed, you will see the extension icon in the Chrome toolbar.

Step 4: Enable CORS Extention

  1. Click on the extension icon (a big 'C' button) in the Chrome toolbar.

  2. This action enables the extension and resolves CORS issues for your local environment.

Final Check

Once you have completed these steps, you should be all set to integrate the address auto-complete library in your local development environment without encountering CORS issues.

Note:

  • Make sure the BatchData app is running and accessible.

  • If you face any issues, double-check the client token settings and ensure that the local IP (127.0.0.1) is whitelisted.

  • If problems persist, confirm that the CORS extension is enabled and configured correctly.

By following these steps, you'll create a CORS-friendly environment for seamless integration of our address auto-complete library during local development. If you encounter any further challenges, please reach out to our support team for assistance. Happy coding!

Did this answer your question?