This indicates that a signed token request, sent to Ably to request a token, is not valid: the cryptographic signature isn't what it should.

Things you should check which may be causing this problem:

  • The api key used to instantiate the library that generates the token request is not correct. Double check that you haven't accidentally clipped off the last letter or two, or added a space at the end.
  • Make sure the token request JSON has not been altered.  A valid token as JSON looks like this:
      "keyName":"I2E_JQ.r_aOYg", /* String value, matches key used when instancing lib */
      "clientId":"foo", /* optional, must be a string value, NOT case clientId, not client_id */.
      "ttl":43200000, /* integer in milliseconds, NOT seconds */
      "timestamp": 1500452987683, /* integer, milliseconds since the epoch, NOT seconds */
      "capability":"{\"*\":[\"*\"]}", /* This should be stringified JSON, not actual JSON */
      "nonce":"5137f32abdaccfcef49d98451da018d0", /* string value generated randomly by the lib */
      "mac":"g6vNUDFWhvUoZABYX2HiKoFh7bEYG394oJlhqNxTno0=" /* the Mac in question generated from the other values & the secret part of your API key */

If you've gone through the list above and are still getting this error, try to get a debug-level log of the generation of a token request, and contact us for more help.