"getUserToken" returns "You are not allowed to use this application when Google Authenticator Plugin is enabled"

I am using RPC “getUserToken” as part of our integration to retrieve bookings from simply book.

Our integration was working fine and then it suddenly stopped working.

The message back from the API we see is “You are not allowed to use this application when Google Authenticator Plugin is enabled”.

Can you provide some assistance please?

Hi Jon,

This error is expected. The legacy JSON-RPC method getUserToken is deliberately blocked for companies that have the Google Authenticator plugin enabled (error code -33006). It most likely started failing because the plugin was recently enabled on your account.

You don’t need to rewrite your whole application. Only the authentication step has to change, and everything else can keep using the JSON-RPC API:

  1. Get the token from the REST API. Call POST /admin/auth with your company login, user login, and an API User Key (a string starting with api_user_key_…) in place of the password. When an API User Key is used, the 2FA step is skipped, so you receive an access token even with Google Authenticator enabled. This is the best fit for server-to-server integrations.
  2. Use that token in your existing JSON-RPC calls. The token issued by the REST API is the same kind of token as the one getUserToken returned, so it is accepted by the JSON-RPC API. Pass it in the X-Token header, together with X-Company-Login, exactly as you do now. In practice, you only replace the getUserToken call with a POST /admin/auth request, and the rest of your integration stays unchanged.

If you authenticate with a password instead of an API User Key, POST /admin/auth returns a sessionId and requires a second step, POST /admin/auth/2fa, with that session id and the code. This needs a person to provide the code each time, so it is not suitable for automated integrations.

Alternatively, if you don’t need two-factor authentication, you can disable the Google Authenticator plugin, and getUserToken will work again.

Best regards,
Vitalii
Simplybook.me Team

Thank you for your prompt response which explains what we need to do.

I do have another query but I will raise another question for this.