StephanieNhiLe / Visa-Climate-Tech-Hackathon

An eco-friendly dashboard providing personalized insights and sustainable spending tips.
2 stars 0 forks source link

Access Ecolytiq APIs key #1

Closed StephanieNhiLe closed 2 weeks ago

Distorted-Dundar commented 2 weeks ago

We can request tokens for an hour by doing this

  1. Install insomnia and use the scratchpad feature

  2. Click the plus sign and select the curl option

    image
  3. Paste the curl command that was specified in the email. curl -X 'POST' 'https://api.staging.ecolytiq.arm.ecolytiq.network/oauth/token' \ -H 'Content-Type: application/x-www-form-urlencoded; charset=utf-8' \ -u '<client_id>:<client_secret>' \ --data-urlencode 'grant_type=client_credentials' \ --data-urlencode 'scope=all' . Make sure to fill in <client_id> and <client_secret>.

  4. Hit send and you should see the following object returned

    
    {
    "access_token": "<TOKEN>",
    "token_type": "bearer",
    "expires_in": 3599,
    "scope": "all",
    "jti": "zGsF6ihKICIvcUpQzMOBRFXkWqc"
    }