Facing Issues while migrating from JWT app type to ServertoServer OAuth

We have our chatbot on zoom but While migrating form JWT App type to Server To Server Oauth I am facing this issue

the below request made to get access token:-

url: https://zoom.us/oauth/token?grant_type=account_credentials&account_id=accountid,
method: ‘POST’,
headers: {
‘Authorization’: 'Basic ’ + Buffer.from(‘clientId’ + ‘:’ + ‘client Secret’).toString(‘base64’)
}

After getting the access token i am using that token to get userDetails by providing their user id
uri: “https://api.zoom.us/v2/users/me” + payloadData.payload.userId,
qs: {
status: ‘active’
},
auth: {
‘bearer’: body.access_token
},
headers: {
‘content-type’: ‘application/json’
},
json: true //Parse the JSON string in the response

I am successfully getting the response and every thing works fine, but while sending the messgae to particular user from the bot I am
getting this error:- data: {
code: 7002,
message: ‘Invalid robot_jid specified in the request body.’,
result: false
}

==================================================================
But while using JWT app type i am using the same logic
→ Generating token using below API:-
url: https://api.zoom.us/oauth/token?grant_type=client_credentials,
method: ‘POST’,
headers: {
‘Authorization’: 'Basic ’ + Buffer.from(config.env.zoom_client_id.value + ‘:’ + config.env.zoom_client_secret.value).toString(‘base64’)
}
→ Then Getting userJID using below Api:-
uri: “https://api.zoom.us/v2/users/” + emailid,
qs: {
status: ‘active’
},
auth: {
‘bearer’: access_token //geneated uisnf JWT APi key and API secrete key
},
headers: {
‘User-Agent’: ‘Zoom-api-Jwt-Request’,
‘content-type’: ‘application/json’
},
json: true

→ In this everything is working fine end to end , but dont know why it not working in ServertoServer OAuth app type

------> user:read:admin chat_message:write:admin imchat:bot chat_channel:read:admin chat_message:read:admin }-> Scope in ServerToServer OAuth
------> imchat:bot }-> Scope defined in Oauth app

hello team,

any updates?

@all - please respond to this customer please

@karen.best @sanjay.de

apologies for the delay here.

Can you send me the request body? I would like to check at my end.

 {
  token: 'eyJhbGciOiJIUzUxMiIsInYiOiIyLjAiLCJraWQiOiI0M2UwNDNkNi02NWU3LTRiNDctYjYzNy0xMjI0ODRkYTVjZGQifQ.eyJ2ZXIiOjgsImF1aWQiOiIwNDZlNTVhNmM4ZDA3NDUwNmEzMzcxOWUwYTRiMjlkZCIsImNvZGUiOiJERS1hQ01IYVNpUzNGOXdwTTk3TzF3czRTM3Y3NUZIb0siLCJpc3MiOiJ6bTpjaWQ6VWozQVBxb0tUajZBS2hjUmpUQ3lBIiwiZ25vIjowLCJ0eXBlIjozLCJhdWQiOiJodHRwczovL29hdXRoLnpvb20udXMiLCJ1aWQiOiIzT2xCTFpycVRpS1lwUFdKVU5RTHR3IiwibmJmIjoxNjgwMjUyOTAxLCJleHAiOjE2ODAyNTY1MDEsImlhdCI6MTY4MDI1MjkwMSwiYWlkIjoiV3QwNlZ6Y1dRXy00cTBfMHV1elMwUSIsImp0aSI6ImRlNDg2MWU1LTY5YTQtNDk1Ni1iMzlmLWNjOWI1NTkwZjRjZSJ9.x3fF0kphRmG2LqmcT4Sq0Eal3j3ubOF-WxiTPlMP3PgO62xrTrjWhQWn4RqvzKTBiT_S_qJ1Pk_k5HMCAQi5vA',
  data: {
    code: 7002,
    message: 'Invalid robot_jid specified in the request body.',
    result: false
  }
}

2023-03-31T08:55:05.211Z Data came in {
  event: 'bot_notification',
  payload: {
    robotJid: 'v1_dl2_bo8tkqbrbaac2mgtg@xmpp.zoom.us',
    toJid: '3olblzrqtikyppwjunqltw@xmpp.zoom.us',
    userJid: '3olblzrqtikyppwjunqltw@xmpp.zoom.us',
    cmd: 'hi',
    accountId: 'Wt06VzcWQ_-4q0_0uuzS0Q',
    userId: '3OlBLZrqTiKYpPWJUNQLtw',
    name: 'Sanjay De',
    channelName: 'Sanjay De',
    userName: 'Sanjay De',
    triggerId: '-g-KpILfTKS3l5rySCbr1w',
    timestamp: 1672048841871
  }
}

@ojus.zoom are you able to take a look at this request please?

I appreciate your help!

@sanjay.de @karen.best apologies for the delay on this.

Can you confirm that this is the same robot_jid that is shown in your app?