Refreshing your Access Token

Use your email and password to generate a new token

This is useful when your token has been lost, compromised, or has expired. POST your email and password to the /auth endpoint and get a new token back:

curl -X 'POST' \
  'https://data.greenchoice.co/auth' \
  -H 'accept: application/json' \
  -H 'Content-Type: multipart/form-data' \
  -F '[email protected]' \
  -F 'password=ThisisMyPassword'

This returns an object with your new token:

{
  "email": "[email protected]",
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6ImFjY2VzcyJ9.eyJpYXQiOjE2NjA5MjU5MzcsImV4cCI6MTY2MzUxNzkzNywiYXVkIjoiaHR0cHM6Ly95b3VyZG9tYWluLmNvbSIsImlzcyI6ImZlYXRoZXJzIiwic3ViIjoiMiIsImp0aSI6ImI2MTAzNDY2LTkxOWYtNGFhMC1iNDIzLTI1OTM1MjA4NjYwYyJ9.pwycmFMdPl5c3ZG80aac4RaOKaIAESZpNsB0cIOMhp0",
  "expires": "2022-11-15T01:02:13.119Z"
}