Skip to main content

Hello

 

I’m trying to login using the Ampli CLI, using the ampli pull command, but when the browser open, and after a short time, the browser displays the following error message: “We cannot authenticate Ampli CLI”.

 

I also tried to just use the javascript SDK without the CLI, and use the init method with an API key (made from the Data → Settings → API Key page), but that too returns an error: “Invalid API key`.

 

I’m not entirely sure what to do net to debug this?

 

Kind regards,

 

Alex

Hello @alexnicol ,

 

If you want to login through the Ampli CLI, can you clear your cache and cookies and log out of your Amplitude Org. You then need to have the command “ampli login” run so that you can login. Then you can use ampli pull to get the latest tracking plan and ampli verify to check if all the current events are implemented. 

I hope this helps for now but if you are still having issues using ampli login command, you can come back here and we can proceed!


Hi @Denis Holmes 

Thanks for your answer.

Unfortunately, after clearing cache, cookies, and logging out, and running `ampli login`, I still have the same issue.

Thanks


Hi @alexnicol ,

 

  1. So you logged out of your Amplitude Organization and logged back into the one you want data for, correct?
  2. You installed Ampli SDK through npm or another provider, correct?
  3. You then initialized with ampli pull which created a new project for you, correct? 
  4. Did the browser open for authentication? Do you have any VPNs or Adblockers active?
  5. Can you send me a PM with your Org ID, Project ID the API Key is not working for and the email address you use for your Amplitude organization? Thank you!

Kind Regards,
Denis


Hi @Denis Holmes 

  1. Yes
  2. Npm
  3. Yes
  4. The browser did open, I don’t have any active VPNs, and I deactivated any ad blockers or privacy extensions.
  5. I’ll do that now.

I'm not exactly sure why, but turns out that copy/pasting the URL generated by `ampli pull` into a different browser actually did the trick.


Reply