Calculate APIs
Breadcrumbs

(GET)-Token Authentication

Customer Information & Usage API

Stage (Test): https://pge-pe-api.gridx.com/stage/v1/auth/token

Production: https://pge-pe-api.gridx.com/v1/auth/token

Description

To use the Customer Information and Usage 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 and Usage 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/

Screenshot 2024-12-09 at 10.19.57 AM.png

Example

Sample Token Request - Customer Information & Usage API
curl --location 'https://pge-pe-api.gridx.com/stage/v1/auth/token' \
--header 'Authorization: Basic MjVwZmc1aWEwajJxNnBuam5vbWJlaTBpM2w6MXQ4ZGFpNjZpMmF1bG9mbWswOGVjYzdiMm10ZGc1dmRpM25iZGpkbnFtcmtybzZpbmozaA=='
Sample Token Response

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