Login Authentication
Enter your credentials and receive a token to use in subsequent requests.
Log In
Authentication is performed on a per-user basis. Valid portal credentials (username/password) submitted through the Log In endpoint results in a token that can be used to authorize subsequent API calls.
Production vs. Staging
Login-based auth tokens (and API keys) are scoped to production or staging environments separately so make sure you are creating your key in the appropriate environment in which you want to use it. You will receive a 403 error if the key (or login-based auth token) is invalid.
Authorization Headers
Requests to all other endpoints are authorized through the Authorization HTTP header. The token from the login response must be used as the value in the header.
Header format
Authorization: Bearer <token>
POST /account/<account-id>/meters/search HTTP/2
Accept-Encoding: gzip
Host: example.com
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiOWIxODc2YzEtMTk5Yy00ZjRjLWJmYjEtNWZkMTEzM2M1MGJjIiwiYWNjb3VudF9pZCI6ImJjZjc1YWQ3LTE5OWMtMTk1NC1iZmIxLTVmZTExMzNhNTBiYyIsInBlcm1pc3Npb25zIjpbIlJlZ2lzdGVyTWV0ZXIiLCJHZXRNZXRlciIsIkRlbGV0ZU1ldGVyIiwiUGxhY2VCaWQiLCJHZXRCaWQiXSwiZXhwaXJhdGlvbl9kYXRlIjoiMjAxOC0wNy0wOVQxMzoxNjo0N1oifQ.6WQXgno7zU9lrn0IeZYMSoYGNTHUi26m6S5grSGHfEI
Token Expiration
Once issued, a token is valid for 30 minutes. Submit a new login request to receive an updated token.
Alternatively, you can use the refresh token process below to get a new auth token:
- Send a GET request to /v1.1/refresh_token
- Include the refresh_token from the original auth response in the bearer auth header and you will receive a new auth token
Updated 12 days ago