Pages - Module 4 - Unit 3 Errors on search

Everything works well on my local machine until Until Module 4 - Unit 2. However, on unit 3:

  • I created the Mapbox account and copy the Default public token autogenerated, on the home page and replated with the YOUR_MAPBOX_API_KEY;
  • I created the StoreLocator.tsx and updated the locator.tsx accordingly;
  • The map is loaded correctly and initialization.
  • When I paste " New York City, New York, United States" or write something in the searchbar, I receive the following errors:
  1. https://prod-cdn.us.yextapis.com/v2/accounts/me/search/filtersearch?input=New+York+City… with 401 (Unauthorized)
  2. FilterSearch.tsx:137 Error occurred executing a filter search request.
    Error: Invalid API Key
    at new SearchError2
    Did anyone encountered this? How can I solve this? Are there any other things that I need to check?
    *Keep in mind that the search on Unit 2 works as shown in Demo.

Hello @Catalin_Neagu

Is it production environment you are working with since the url you have mentioned looks for production environment rather than sandbox.
Also if it is production environment, have you checked the yext search api key wheather it is correct which you must have created in process.