Skip to content

Authentication

Base URL:

  • Production: https://api.gis.ph
  • Local Development: https://api.gis.ph

All /v1/* endpoints require authentication via the Authorization header.


To obtain an API token, please request access here.


The API currently supports the following authentication method:

Best for: Internal tools, server-side integrations.

GET https://api.gis.ph/v1/provinces
Authorization: Bearer <YOUR_TOKEN>
  • Include your token in the Authorization header as a Bearer token.
  • Note: Ensure you keep your token secure and do not expose it in client-side code (e.g., browsers).

Terminal window
curl -H "Authorization: Bearer your_token_here" \
https://api.gis.ph/v1/provinces
### Variables
@baseUrl = https://api.gis.ph
@token = your_token_here
### Get all provinces
GET {{baseUrl}}/v1/provinces
Authorization: Bearer {{token}}
  1. Create a new request
  2. Set the method (GET, POST, etc.) and URL
  3. Go to the Authorization tab
  4. Select Bearer Token as the type
  5. Paste your token in the Token field
  6. Send the request

  1. Never commit keys to version control

    • Use environment variables: process.env.GIS_API_KEY
    • Add .env to your .gitignore
  2. Secure your token

    • Treat your token like a password
    • Only use it for trusted operations

Missing or invalid token:

{
"message": "Unauthorized"
}

Common causes:

  • No Authorization header provided
  • Token format is incorrect
  • Token is invalid or expired

Resource doesn’t exist or user doesn’t have access:

{
"message": "Not found"
}