Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

371
Views
Unable to get token in Recharge { error: 'unsupported_grant_type' }
    const axios = require("axios");
    const BASE_URL = `https://www.admin.rechargeapps.com/oauth/token`
    var params = {
     code: "0xDEADBEEF",
     grant_type: "authorization_code",
     redirect_uri: "https://your_domain.com",
     client_id: "*********************"
   }
   let body = JSON.stringify(params)
   getCompatibility = () => axios({
     method: "POST",
     url: BASE_URL,
     data: body,
     headers: {
        "Content-Type": "application/json"
     },

    })

I tried this to get token from recharge but all am getting is data: { error: 'unsupported_grant_type' } is there anything I have missed here?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Hey you just need to change grant_type with "client_credentials":-

  const axios = require("axios");
    const BASE_URL = `https://www.admin.rechargeapps.com/oauth/token`
    var params = {
     code: "0xDEADBEEF",
     grant_type: "client_credentials",
     redirect_uri: "https://your_domain.com",
     client_id: "*********************"
   }
   let body = JSON.stringify(params)
   getCompatibility = () => axios({
     method: "POST",
     url: BASE_URL,
     data: body,
     headers: {
        "Content-Type": "application/json"
     },

    })
)

Thanks !

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!