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

340
Views
Chrome extension get auth token without using chrome app

I am trying to get an auth token using:

chrome.identity.getAuthToken({ interactive: false }, function (token) {
    console.log('token', token);
});

token is undefined and I receive the error:

Unchecked runtime.lastError: OAuth2 request failed: Service responded with error: 'bad client id

my manifest json's oauth2 looks like this:

"version": "1.0",
"manifest_version": 3,
"background": {
    "service_worker": "background.js"
},
"oauth2": {
    "client_id": "<my_client_id>.apps.googleusercontent.com",
    "scopes": [
        "profile email",
        "https://www.googleapis.com/auth/userinfo.email",
        "https://www.googleapis.com/auth/drive.file"
    ]
},

I added my client id following the instructions here:

https://developer.chrome.com/docs/extensions/mv3/tut_oauth/#oauth_client

I notice that the instructions say:

On the Create client ID page, select Chrome App

However, chrome apps are being deprecated. So I have two questions, why is my client id bad, and is there a way to auth a user without using a chrome app, as chrome apps are being deprecated.

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!