Pubsub Auth with accesstoken?

Your code is correct. You should pass the accessToken as the auth_token

But for the bits topics, you need a token with

  • v1 - any scope
  • v2 - bits:read

As documented

This is indicative you are passing a token with no scopes at all on it.