Solved Invalid Token

Status
Not open for further replies.

JorgeWillianSantos

Bronze Partner
Advanced Certified
Joined
Dec 19, 2023
Messages
38
Reaction score
7
Hello! I'm setting up an API in 3CX that the trigger of a call generates the sending of a message to Whatsapp from the originating number, but when I put the JSON data in the CFD the "invalid token" error is returned, the same test performed in Postman with the same data does not present the failure, can they tell me if it could be some problem in the CFD or if some adjustment in the API is neededCan you tell me if it could be a problem in the CFD or if some adjustment is needed in the API?
 

Attachments

  • WhatsApp Image 2024-06-24 at 16.41.50.jpeg
    WhatsApp Image 2024-06-24 at 16.41.50.jpeg
    40.1 KB · Views: 21
  • WhatsApp Image 2024-06-24 at 16.41.35.jpeg
    WhatsApp Image 2024-06-24 at 16.41.35.jpeg
    33.8 KB · Views: 19
  • WhatsApp Image 2024-06-24 at 16.40.53.jpeg
    WhatsApp Image 2024-06-24 at 16.40.53.jpeg
    44.9 KB · Views: 20
  • WhatsApp Image 2024-06-24 at 16.40.06.jpeg
    WhatsApp Image 2024-06-24 at 16.40.06.jpeg
    71.6 KB · Views: 19
Most probably the issue is related to authentication. How are you authorizing this request in Postman? You need to replicate that in the CFD App.
 
Hello, the authentication I use in postman is the Bearer Token.
 

Attachments

  • WhatsApp Image 2024-06-25 at 09.39.30.jpeg
    WhatsApp Image 2024-06-25 at 09.39.30.jpeg
    57.9 KB · Views: 17
It should be:
Authorization: Bearer TOKEN
 
I did it this way and it worked, thank you so much!
 
Status
Not open for further replies.

Forum statistics

Threads
111,974
Messages
590,081
Members
164,899
Latest member
mazet