Hi,
I want to send an agentless whatsapp from the developper tools tab "send an agentless whatsapp
I get this error message :
{
"message": "This request requires a non-user context. User token cannot be used for requests to this resource.",
"code": "not.a.client",
"status": 400,
"contextId": "7c3ecf32-c536-4816-aab0-cffdf9470408",
"details": [],
"errors": []
}
Off hand I'd say you'll need to generate an OAuth token and use Postman or Insomnia or similar.
Some things can't be done by a user, some things can only be done a user.
The API is clear on this;
Send an agentless outbound message. Send an agentless (api participant) outbound message using a client credential grant. In order to call this endpoint you will need OAuth token generated using OAuth client credentials authorized with at least messaging scope. This will generate a new Conversation, if there is an existing active Conversation between the fromAddress and toAddress already, then this POST will fail.
You will need to implement the client credentials grant in your application or use a local tool like postman to test it. Client credentials are never able to be used in a browser under any circumstances.
What type of OAUTH should I choose?
once this OAUTH generated how should I implement it with the developper tools part?
I have never used postman, is there a place where I should declare OAUTH?
Regards
What type of OAUTH should I choose?
once this OAUTH generated how should I implement it with the developper tools part?
I have never used postman, is there a place where I should declare OAUTH?
Regards
[/quote]
@Riko80 You must regenerate your client secret immediately. You have posted your org's credentials publicly on the internet. I have removed the offending screenshots, but some person/app could have scraped the values. Please review with your security team to check for unauthorized activity in your org. Client secrets must always be handled like passwords.
Please read the error message you're getting in the response; it tells you what is wrong. Refer to the client credentials documentation linked above for documentation on the correct format. You must send the request exactly as documented.