Recent searches


No recent searches

zcli login -i login error



Posted Jan 30, 2023

"failed to log in to your account: ."

Hi, trying to use ZCLI and can't seem to login?

The credentials are correct.

Password access is enabled on the zendesk API, along with token access.

Also tried logging in with the token by putting my email/token in the password field but no luck.

Additionally, does ZCLI require the zendesk account owners login details instead of an admin user?


0

10

10 comments

image avatar

Zach Anthony

Zendesk Product Manager

Hi Alex,

I can understand that the prompt is a little unclear for using an API token. In order to use an API token to log in, you will need to enter your email address and then '/token'. For example test@demo.com/token and then enter the API token as a password. ZCLI does not require the Zendesk account owner's login details, an admin user will do just fine.

Hope this helps!

1


Many thanks Zach.

Still unsure why the password access wasn't working but got in with the token access.

0


So, if I am using environment variables, I would need to set:

ZENDESK_SUBDOMAIN = mysubdomain

ZENDESK_EMAIL = username@mycompany.com/token

ZENDESK_PASSWORD = api token

Correct?  If so, that is exactly what I am doing, and I still get the message "Failed to load secure credentials store: use environment variables to log in.  You can user credentials stored in environment variables..."

0


image avatar

James Rodewig

Zendesk Documentation Team

Hi Kent Babb,

If you're using environment variables, omit "/token" from the ZENDESK_EMAIL value. ZCLI will append this suffix for you. I'll update the docs to make this clearer.

Hope that helps!

1


Part of my problem was not knowing that if you choose to use the environment variables, you do NOT need to execute the zcli login command.  That part was not clear to me.

0


image avatar

James Rodewig

Zendesk Documentation Team

Thanks for the feedback, Kent.

We've made some recent changes to the docs to make this more clear:

  • You can authenticate ZCLI using one method (profiles or environment variables): docs
  • Order of precedence for profiles vs environment variables: docs

0


James Rodewig or others on the Zendesk documentation team:

The current documentation for profiles is incorrect. It says `/token` should be appended to the email when doing `zcli login -i` but that throws this error: 

Failed to log in to your account: .`

Removing `/token` did, however, successfully login to the profile.

This is the section that needs to be fixed: https://developer.zendesk.com/documentation/apps/getting-started/using-zcli/#profiles

ZCLI Version: @zendesk/zcli/1.0.0-beta.47 darwin-x64 node-v20.17.0
 

0


image avatar

Zach Anthony

Zendesk Product Manager

Hi Nate Koterba , thanks for flagging this issue. As of version 1.0.0-beta.47, the login command no longer requires '/token' to be appended to your email address. Ill be sure to make sure this is updated in our documentation accordingly.

0


The support page titled “Previewing Theme Changes Locally” also still says you need “/token” after the email. Got stuck with “Failed to log in to your account .” for a while until I saw this page.

0


image avatar

Zach Anthony

Zendesk Product Manager

Hi Jorge Pinon , thanks for flagging this issue. It looks like we missed updating this documentation previously, so I've gone ahead and organized to have this updated.

0


Please sign in to leave a comment.

Didn't find what you're looking for?

New post