How to set `auto accept` when inviting a user to a channel?

[Problem/Question]
// Detailed description of issue.
org.sendbird.client.ApiException: {“error”:true,“message”:“"invitation" not found.”,“code”:400201}

// If problem, please fill out the below. If question, please delete.
[SDK Version]
// What version of the SDK are you using?
sendbird-platform-sdk:1.0.23 JAVA
[Reproduction Steps]
// Please provide reproduction steps and, if possible, code snippets.

  1. create user
  2. create channel
  3. invite user
  4. accept user <<
    [Frequency]
    // How frequently is this issue occurring?
    each time I try
    [Current impact]
    // How is this currently impacting your implementation?
  5. Getting error
  6. User is unable to retrieve the channel from /users/{userId}/my_group_channels

Hello @seanlee,

The default behavior is to auto accept invitations meaning there would not be any invitation to accept.

Further more, if you’re implicitly using the invite endpoint, you can set the invitiation status. The default is auto join

If the channel is empty, it likely is not being returned in the my_group_channels query unless you include the show_empty=true parameter.

Thank you for your reply. Maybe I should be bit more specific.

So this is what I see in the dashboard. Invited a user and a bot to a non-super group channel. and I see both the bot and the user in the dashboard > group channel > members.

However, if I make a GET /v3/users/{userId}/my_group_channels

I get this.

{
    "channels": [
    ],
    "next": "",
    "ts": 1739891098824
}

So it appears, the endpoint only returns super channels.

Hello,

The endpoint has a number of query parameters to determine what it returns. Does the channel have any messages in it?

Okay I think I got it. it appears that if the channel has no message or no “recent” message, then it returns . Once I added message, it started showing up in the response. Thanks!