*** id: cfdcb53b-ae4c-4f50-864b-d9c7f709ac19 title: getAllowedChannels slug: /js/reference/pubsub/client/get-allowed-channels description: getAllowedChannels method for the PubSub.Client class. max-toc-depth: 3 ---------------- ### getAllowedChannels * **getAllowedChannels**(): `Promise` Returns the channels that the current token allows you to subscribe to. #### Returns `Promise` An object whose keys are the channel names, and whose values are the permissions. For example: ```js { "my-channel-1": { "read": true, "write": false }, "my-channel-2": { "read": true, "write": true }, } ``` #### Example ```js const pubSubClient = new PubSub.Client({ token: "", }); const channels = await pubSubClient.getAllowedChannels(); console.log(channels); ```