LogoLogo
HomeProductSolutionsAbout usContactLog in
  • Overview
    • Welcome to answr
    • Our Features
    • Data Layer Availability
  • Start Here
    • How to make your first API call
  • Coding Examples
    • Code Samples
    • Simple climatic variables plotting
    • Climatic variables spatial plotting
    • Reporting tool
  • Integrations
    • Connect answr with Zapier
    • Connect answr with Make
  • Data Sources
    • Sentinel-1 imagery
    • Sentinel-2 imagery
    • Sentinel-3 imagery
    • Landsat 8 imagery
    • Landsat 9 imagery
    • MODIS
    • Global Surface Water
    • Flood Hazard Maps at European and Global Scale
    • AgERA5
    • Soil moisture
  • API Data Layers
    • Climate Analytics
      • Climatic Variables
      • Köppen–Geiger Zones
      • Universal Thermal Climate Index
    • Natural Disasters
      • Cold Wave Probability
      • Drought Probability
      • Flood Severity
      • Heat Wave Probability
      • Windstorm Probability
      • Wildfire Frequency Occurrence
      • Extreme Heat Probability
      • Extreme Cold Probability
  • API Reference
    • Authentication
    • Climatic Variables
    • Natural Disasters
  • Surveys
    • Feedback
Powered by GitBook
On this page
  1. API Reference

Authentication

API endpoints specifications

PreviousExtreme Cold ProbabilityNextClimatic Variables

Last updated 2 years ago

auth

  • auth
  • POSTLogin and retrieve an authentication token
  • GETGet the user record belonging to the authentication token
  • POSTSignup and retrieve an authentication token

Get the user record belonging to the authentication token

get

Get the user record belonging to the authentication token Authentication: required

Authorizations
Responses
200
Success!
application/json
400
Input Error. Check the request payload for issues.
401
Unauthorized
403
Access denied. Additional privileges are needed access the requested resource.
404
Not Found. The requested resource does not exist.
429
Rate Limited. Too many requests.
500
Unexpected error
get
GET /api:auth/auth/me HTTP/1.1
Host: api.answr.space
Authorization: Bearer JWT
Accept: */*
{
  "id": 1,
  "created_at": "now",
  "name": "text",
  "email": "name@gmail.com",
  "role": "admin",
  "company": "text",
  "active_requests": 1
}

Login and retrieve an authentication token

post

Login and retrieve an authentication token Authentication: not required

Body
emailstring · emailOptional
passwordstringOptional
Responses
200
Success!
application/json
400
Input Error. Check the request payload for issues.
401
Unauthorized
403
Access denied. Additional privileges are needed access the requested resource.
404
Not Found. The requested resource does not exist.
429
Rate Limited. Too many requests.
500
Unexpected error
post
POST /api:auth/auth/login HTTP/1.1
Host: api.answr.space
Content-Type: application/json
Accept: */*
Content-Length: 44

{
  "email": "name@gmail.com",
  "password": "text"
}
{
  "authToken": "text",
  "user": "text"
}

Signup and retrieve an authentication token

post

Signup and retrieve an authentication token Authentication: not required

Body
namestringRequired
emailstring · emailRequired
passwordstringRequired
companystringRequired
Responses
200
Success!
application/json
400
Input Error. Check the request payload for issues.
401
Unauthorized
403
Access denied. Additional privileges are needed access the requested resource.
404
Not Found. The requested resource does not exist.
429
Rate Limited. Too many requests.
500
Unexpected error
post
POST /api:auth/auth/signup HTTP/1.1
Host: api.answr.space
Content-Type: application/json
Accept: */*
Content-Length: 75

{
  "name": "text",
  "email": "name@gmail.com",
  "password": "text",
  "company": "text"
}
{
  "authToken": "text",
  "user": "text"
}