Chat bot send message without user initiating first

Description
I’m working on a chat bot to send alerts to users. The problem is I need the jid of the user to be able to send a message. I tried using GET /users/{email_here} to get the user jid but it returns an error Invalid api key or secret. The access token works for POST /im/chat/messages so I think the issue is not with the access token. Any advice? Thank you.

Error
{
“code”: 200,
“message”: “Invalid api key or secret.”
}

Which App Type (OAuth / Chatbot / JWT / Webhook)?

App Type: Chatbot

Which Endpoint/s?
Knowing the API endpoint/s can help us to identify your issue faster. Please link the ones you need help/have a question with.

Endpoint: GET /users/{userId}

How To Reproduce (If applicable)
Steps to reproduce the behavior:

  1. Request URL / Headers (without credentials) / Body
  2. See error

Screenshots (If applicable)
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

Hey @kebinjj,

To call the Get User endpoint, you can use your same Chat bot app, but you need to get a user access token instead of a chatbot access token. Checkout the guide here:

Thanks,
Tommy

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.