How to specific channel access code when listing messages?

Hi there!

I’m creating group channels via API and use the access_code to create public, protected channels.
In a next step, I’m trying to list messages on those channels now using the API again but it fails with a “access denied” server response.

How can I hand over the group’s access code when using the API to list messages? Can’t find anything in the docs…


Hi Andreas,

If you have created a channel using an access code, you need to add the access code when joining the channel to join.

docs are here.

  • HTTP request

  • Request body example
    “user_id”: “user3”,

Hi Scott,

Thanks! I don’t want to add a user to the channel but just list the messages in it using the server API (for migration purposes). I’ve tried handing over the access code in different ways (query param, header) but nothing seems to work.

Channel messages created with access codes cannot be listed.

How about clearing the access code for migration and updating the access code again after the job is done?

Update Channel