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

219
Views
'Empty oauth2 access token' error from LinkedIn apis

Here I'm passing "Bearer +token" in the header.But still getting Empty oauth2 access token' error. I have even hardcoded token value.still the response is the name instead of "invalid token".

axios.get("https://api.linkedin.com/v2/me",{ headers: { 'Authorization': Bearer ${linkedinToken} }}).then((response) => { console.log(response,'details')

    firstName = response.data.localizedFirstName;
    lastName = response.data.localizedLastName;

    console.log('firstname',(firstName));
    console.log('lastname',(lastName));


    axios.get(`https://api.linkedin.com/v2/emailAddress?q=members&projection=(elements*(handle~))`,null,
  {
  
    headers: {
      'Content-Type': 'application/json',
      'Authorization': `Bearer ${linkedinToken}`
      
    }
  
  }).then((response) => {
    console.log('email',response);
  }).catch((error) => {
    console.log('error from email api',(error));
  })

  }).catch((error) => {
    console.log(error,'error from name api')
  })
about 4 years ago · Juan Pablo Isaza
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!