Authentication - Implan-Group/api GitHub Wiki

Authentication

A Json Web Token containing Authentication information is required to be sent with every Request (except to the auth endpoint below). Include this token in the Request headers as Authorization={token}. Please note that the token must start with Bearer .

A bearer token is valid for 24 hours after acquisition.

It is required that you cache this token for re-use. Requesting too many tokens in too short a time can result in 429 Too Many Requests or 503 Service Unavailable responses. Continued authentication attempts can result in temporary API bans and/or additional costs.


POST /api/auth

Parameter Spec Type Details
body body json A json body containing your IMPLAN username and password must be included.

🧾Example

📤 Request

POST /api/auth

{
	"username": "[email protected]",
	"password": "fake_password"
}

📥 Response

Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZXNzaW9uTGlmZXRpbWUiOjAsImlkbGVTZXNzaW9uTGlmZXRpbWUiOjAsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL2VtYWlsYWRkcmVzcyI6ImZha2UudXNlckBleGFtcGxlLmNvbSIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL2dpdmVubmFtZSI6IkZha2UiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9zdXJuYW1lIjoiVXNlciIsImlzcyI6Imh0dHBzOi8vYXBwLmltcGxhbi5jb20vIiwic3ViIjoiYXV0aDB8ZGVhZGJlZWZjYWZlIiwiYXVkIjpbImh0dHBzOi8vc2VydmljZXMuaW1wbGFuLmNvbSJdLCJpYXQiOjE3NTUwMDAwMDAsImV4cCI6MTc1NTAwMDAwMCwic2NvcGUiOiJDb25ncmF0cywgeW91IGZvdW5kIG15IGVhc3RlciBlZ2chIiwiYXpwIjoiV2hhenAgd2l0aCB5b3U_In0.CPjOYKWrUee-x4rntlXsDRzZ_4JW3OcsrwdnH8x8s18