Skip to main content
Skip table of contents

(POST) Token Authentication

OpenADR

Stage (Test): https://openadr-vtn-stage.gridx.com/v1/auth/token

Production: https://openadr-vtn.gridx.com/v1/auth/token

Description

To use the OpenADR APIs in either stage (test) or production environments, you must first request a token using the client ID and secret provided to you by your utility partner. The token must be base64-encoded using the following syntax “[clientID]:[clientSecret]”. A single token authentication request is required to use to both the Customer Information / Usage and OpenADR API parameters. The same set of credentials (client ID and secret) will be used for both stage and production access. The token request will expire after a hour. Here’s a resource for encoding:

https://www.base64encode.org/

Example

Sample Token Request - OpenADR
CODE
curl --location --request POST 'https://openadr-vtn-stage.gridx.com/v1/auth/token' \
--header 'Authorization: Basic YzVpbTVvaG5rNGhwc3ZibWFoNjMzdGpraDoxbDE3NWFsZ3JibjhsN2xqYjdrZmkwNmdtZzdvOHFpMzZqdjVlMW9tcmdmMmk3MHE1MWxr'
Sample Token Response (both OpenADR and Pricing API)

eyJraWQiOiJjMFVubE52MHdoRGUwdEY0Ujlndk1PSks4QURkZ3RuUjY0S0VENisxZDhBPSIsImFsZyI6IlJTMjU2In0.eyJzdWIiOiIyNXBmZzVpYTBqMnE2cG5qbm9tYmVpMGkzbCIsInRva2VuX3VzZSI6ImFjY2VzcyIsInNjb3BlIjoiUHJpY2luZ0VuZ2luZVwvQkwiLCJhdXRoX3RpbWUiOjE3MzM3NjY0OTUsImlzcyI6Imh0dHBzOlwvXC9jb2duaXRvLWlkcC51cy13ZXN0LTIuYW1hem9uYXdzLmNvbVwvdXMtd2VzdC0yX0NyVENlc0pYNSIsImV4cCI6MTczMzc3MDA5NSwiaWF0IjoxNzMzNzY2NDk1LCJ2ZXJzaW9uIjoyLCJqdGkiOiI1MmYwYmY4My04NTkzLTRkZTctOWNjOC01NmIwMWQ4YzBkMDUiLCJjbGllbnRfaWQiOiIyNXBmZzVpYTBqMnE2cG5qbm9tYmVpMGkzbCJ9.Lhzn6eIudKiifKh-jUS46RQi2VULI7TFVMXsIBAQTMjvGktGmtifXt1qRbtwSPnhtTNblaxm_bp5mZmlCoLLQ2elKoPftQj1iXB3v2FYTW_iGlWXrUzEzV6EuTWNZ31ma4lCgos9zKzJGCkvTb6NVwSJYqR1fvzLY06w-8ECIukFSXoKUW5OKExYbYxtXDk_d_amgLxhlv4XqkkTwlLaU9LgP1VB6KNOA_Ps4JxiIqM0w0al044ZEyAZ7v7iZPY9zJnFAw4lP7hHhzxdpMZESPxI_Ec3TMF3mYwIQ6OJuMUOPUySsiOApVOIauXk-5sJs4nOjK8X-Mz9ZGqJIgHldQ

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.