getVenue fails with 401

Hello!

I upgraded my map and received a key and secret, but when I try to load the SDK I get a bunch of 401 errors. Is there something else I need to do?

This is my code:

const venue = await getVenue({
	clientId: 'myCKey',
	clientSecret: 'mySecret',
	venue: 'myMapId',
});
const mapView = await showVenue(document.getElementById("app")!, venue);

I get many errors in the console and no map

I checked I upgraded the right map. Do I need to enable it for the SDK?

Hi Tyler,

Welcome to the forum! There are a few things you may have run into. To start, the code sample you’ve pasted is from Mappedin SDK v5. Version 5 does not support maps created using the Mappedin Editor at Mappedin. It can only display maps that are created using our enterprise mapping tools.

The solution is to ensure you are using Mappedin SDK version 6. The best way to begin is to follow our Version 6 Getting Started Guide. Note that your map also has to have shareable turned on before you can use it in the SDK. The Getting Started guide walks through that process as well.

1 Like

That was it, thanks!