MfaRequiredError, message: 'Multi-factor authentication required, please set `otp` query param'

Hi guys, My two step authentication was working fine and then just stopped. When I try to list tokens that I have using the below code I get an error. The two step authentication pop up is not working and never pops up. I do have have the two step set up, as just for grins I clicked on the set up two step and got the error "Could not create MFA token, MFA already enabled. So before I started uninstalling and reinstalling I thought that hopefully there was a simpler fix to try before I created more problems for myself. And the password is right because if I put in a bad one I get the response “error listing tokens: [ { name: ‘PasswordError’, message: ‘Bad Password’, code: 403 } ]” Also, Sorry if I did not post this in the right area, I looked for better but could not find it. Thank you

PS C:\AGC\AGC> particle update-cli
Updating CLI… no plugins to update.
PS C:\AGC\AGC> particle token list
Checking with the cloud…
? Using account xxxxxx@gmail.com
Please enter your password: [hidden]
error listing tokens: [
{
name: ‘MfaRequiredError’,
message: ‘Multi-factor authentication required, please set otp query param’
}
]
Error while listing tokens: Server error

I believe the error with particle token list is a problem with the current version of the CLI when MFA is enabled in your account. The API to retrieve the token list now requires your MFA OTP token in order to retrieve the token list for security reasons, and I don’t think the CLI sends the parameter yet.

Thank you [rickkas7], perhaps they are still setting it up as I tried it the a few days ago and it worked. Regardless, thank you for your reply. I need to set up a new token and wanted to be able to confirm the expiration date once created. What avenue should I go to be able to see the token after creation? Thank you

I’d probably just turn off MFA on your account to do the test, then turn it back on when done.

It’s possible to directly get the token list from the API using curl so you can pass the OTP token, but it’s probably easiest to just temporarily turn off MFA.

That is very helpful, thank you very much!

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.