Ola Maps's APIs can use API keys or JWT for authentication. User can get both set of credentials.
To begin using Ola Maps' geolocation APIs and map tiles API, users need to create credentials in the Ola Maps Developer Portal. Follow the steps below to create credentials.
Step 1: Navigate to the credentials section.
Step 2: Click on the "New Credentials" button in top right corner.
Step 3: Provide a name for your credentials and description.
Step 4: Upon creation, credentials will be listed in table.
Step 5: Click on credentials name to display details. This page will show API Key and OAuth2 client credentials.
Step 6: Add your domains as comma seperated values and click on add button to whitelist your client credentials.
Following shells script demonstrates use of API Keys. Copy one of API Keys from credentials and replace it "api_key"
Similaraly below script demonstrates use of JWT. First API call retrieves access token from OLA Maps authentication service. It is further used as bearer token to call Autocomplete API