How to send a admin message in group channel

hello, i have a problem when send a admin message in group channel

first, i check this document

and i sent request like this

const url = `https://api-${sendBirdAppId}.sendbird.com/v3/group_channels/${channel.url}/messages`

      const data = {
        message_type: 'ADMM',
        message: message.message,
        custom_type: 'notice',
        is_silent: true
      }
      const response = axios({
        method: 'POST',
        headers: {
          Accept: '*/*'
        },
        url,
        data
      })

but i got 400 error.
detail error code is ‘400401’ and message is ’ “Invalid value: “Internal. No such application.”.”’

i check this error code docs

According to this document, it means InvalidApiToken but i don’t understand.

that sendbird app id and channel url is in effect another chat feature

what’s the propblem? i need help

Hello,

You would need to include API token field in the headers. You can retrieve the API token from the dashboard under Setting>General> API tokens

Content-Type: application/json, charset=utf8
Api-Token: {master_api_token or secondary_api_token}
1 Like

I did what you told me to do, it works! Thanks!