So currently I am testing out an API for sms.to as I needed a workaround for mobile phone verification for an app. For context, in my country email verification just wont cut it due to phone/facebook authentication being a widespread norm (so without it, my app’s UX is instantly faulty). That puts firebase authentication out of the way, though I will still use it as the database.
The app is a mulit-vendor e-commerce app with payments and all that, but for some reason I am unable to put the correct body block so that the request is successfull so I keep getting “null” as my response.
I looked throught the other posts (1,2,3,4,5,6) but I still cant figure out how to put the body blocks, and I tested it with postman and it works so I presume my problem here must be the blocks. Below are the images of my blocks, api documentation, and succesfull postman test.
sms.to api docs (I did consider Twilio as it is mentioned a lot here, but unfortuantely it has no support for my country)
Postman POST Test (successful, I was trying to understand whether -d goes in the body or query parameters in thunkable blocks, looks like its a body thing)
Thunkable Project Blocks and Test (is my method to collect and display the response correct? as well as setting the body?)
To reiterate, my assumption is that the response is null here because there is a problem with my blocks. Any clues?
Edit: fixed spelling errors
Edit 2: The solution should be below this text. Muneer’s answer was 100% correct, I tested it again wihtout the
generate JSON from object and just put the
error blocks in and it worked perfectly (no backslashes anymore). Good luck to all who face this problem, I hope this helps!