Live Helper Chat support forum.. Forum is locked. New place for questions - Github Discussions

You are not logged in.

Announcement

#1 2021-06-07 21:30:25

Orestico
Member
Registered: 2021-02-12
Posts: 11

API Rest Call troubles

Hello everyone!
I’m trying to use an API through  the Api Rest Call service.
This is an SMS provider Service API no send a message to some members of my Service Staff.
The provider is instasent.com a service that I have integrated in other services.
So, instasent uses a bearer token, which I put it in the Authentication tab in the chat(inside Api rest call config)
Then, I write an application/json in the Body tab as follows, according to the JSON format of instasent request:
{
   “from”: “XXXX”,
   “to”: “XXXXXX”,
   “text”: “ZZZZZZZZZZ ZZZZZ ZZZZ”
}
From and to are phone numbers and text, the text to send.

The base URL is: api.instasent.com(https)
The request goes to api.instasent.com/sms (https)

So, I’ve tried putting sms in the sub URL, in the host URL, but it doesn’t work, even using the configuration I use in other service.
I always receive a JSON format error, so, my doubt is:
If I write the JSON according to the right format, what pattern is posting LHC.

Best regards.

Last edited by Orestico (2021-06-07 21:31:06)

Offline

#2 2021-06-08 06:15:24

remdex
Administrator
From: Lithuania
Registered: 2012-09-23
Posts: 3,661
Website

Re: API Rest Call troubles

Hi,

Try to verify your json format posting it to some debug server. or write your own script to expect json post.

Quotes have to be "" not  “text”

Offline

#3 2021-06-11 13:56:12

Orestico
Member
Registered: 2021-02-12
Posts: 11

Re: API Rest Call troubles

Hi Remdex,
Thanks a lot! Changing the “” symbols was the solution.
I keep investigating in API  XD
Great job LHC

Offline

Board footer