chrome.identity.getAuthToken not working

The accepted answer is incorrect. You can upload it to the webstore, publish it, then install it from the webstore. After installing, find the installed extension app dir (~/Library/Application\ Support/Google/Chrome/Default/Extensions/<ext id> on a mac), and copy the key key from the installed manifest.json into your source code manifest.json. After adding the key field to your manifest.json, your app id will not change during local development.

Source: https://developer.chrome.com/apps/app_identity#copy_key


Problem Resolved !

the app ID of my Chrome extension does not match with my app ID in Google Console Developpers To avoid this upload first your Extension then copy the ID from Chrome and set it in the Google Console Developpers ! you must update it in Google console everytime you change it in Google Chrome

enter image description here