Introduction
Some of the AirMap Platform services require authentication, such as creating a flight, viewing a profile, sending telemetry, etc. The AirMap Platform uses JSON Web Tokens (JWT) to handle authentication. You will need to use one of the following tools to retrieve a JWT:
- Anonymous Authentication for retrieving a JWT without associating a user.
- Authentication API for retrieving a JWT of an AirMap user over an API.
- Authentication JS Module for retrieving a JWT of an AirMap user in a web app using JavaScript.
- Authentication (Mobile) for retrieving a JWT of an AirMap user with the mobile SDKs.
Making Authenticated API Requests
Once you have retrieved a user's JWT, you will need to include this in any API that requires authentication. Place the JWT in the header in the format Authorization: Bearer <JWT_TOKEN>
For example, to get a user's profile:
## Get User Pilot Profile
curl "https://api.airmap.com/pilot/v2/profile" \
-H 'Content-Type: application/json; charset=utf-8' \
-H 'Authorization: Bearer <JWT_TOKEN>' \
-H 'X-API-Key: <AIRMAP_API_KEY>' \
-d $'{}'
Updated 2 years ago