Authentication
The Searoutesnav API uses bearer tokens. Authenticate with your account email and password to receive a token, then send that token in the Authorization header on every subsequent request.
1. Request a token
Send a POST to /auth/login with your credentials.
curl --request POST \
--url https://api.searoutesnav.com/auth/login \
--header "Content-Type: application/json" \
--data '{"email": "you@example.com", "password": "YOUR_PASSWORD"}'
The response contains your bearer token:
{
"access_token": "eyJ0eXAiOi...",
"token_type": "bearer",
"user": { "id": 1, "email": "you@example.com", "plan_type": "trial" }
}
2. Use the token
Pass the token in the Authorization header as Bearer <token> on all authenticated endpoints.
curl --request GET \
--url https://api.searoutesnav.com/auth/me \
--header "Authorization: Bearer YOUR_ACCESS_TOKEN" \
--header "accept: application/json"
Notes
- Tokens are tied to your account and plan, and count requests against your daily query limit.
- Keep your token private and never expose it in public code repositories.
- Call POST /auth/logout to revoke a token.
- See the API Reference for every endpoint.