Mapbox is a powerful mapping platform that enables developers to create interactive maps for a variety of purposes. Here are some examples of what you can build with the Mapbox API:
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
mapbox: {
type: "app",
app: "mapbox",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://api.mapbox.com/directions/v5/mapbox/driving/41.41338%2C2.27403%3B41.40338%2C2.17403`,
params: {
access_token: `${this.mapbox.$auth.access_token}`,
alternatives: `true`,
geometries: `geojson`,
language: `en`,
overview: `simplified`,
steps: `true`,
},
})
},
})
Mapbox uses API keys for authentication. When you connect your Mapbox account, Pipedream securely stores the keys so you can easily authenticate to Mapbox APIs in both code and no-code steps.
Generate and copy your Access Toke from your Mapbox dashboard.