0

I am trying to send an sms through TextLocal API using Java but I get error 80: invalid template. I also tried to run the same url in a browser and I still get the same error. please tell me how I can fix this

{"errors":[{"code":80,"message":"Invalid template"}],"status":"failure"}

API Key: dasdasdasdasdasdasd
message: 2950 is the otp for app registration. Thanks - TECH SCFGGH PVT LTD

https://api.textlocal.in/send/?apikey=dasdasdasdasdasdasd&numbers=1234567899&message=2950%20is%20the%20otp%20for%20app%20registration.%20Thanks%20-%20TECH%20SCFGGH%20PVT%20LTD&sender=XTCTCF
ΦXocę 웃 Пepeúpa ツ
  • 47,427
  • 17
  • 69
  • 97
Black
  • 81
  • 1
  • 14

2 Answers2

0

according to the official doc here

you are sending a message that "given didn't match any approved templates on your account."

ΦXocę 웃 Пepeúpa ツ
  • 47,427
  • 17
  • 69
  • 97
  • My template is like this:%%|OTP^{"inputtype" : "text", "maxlength" : "4"}%% is the otp for app registration. Thanks - TECH SCFGGH PVT LTD – Black Dec 29 '20 at 12:44
  • The template is approved by TextLocal and also I am able to send to send SMS through their site using the same template – Black Dec 29 '20 at 12:52
0

I found the answer from the TextLocal Support, there was a space after sender. So

XTCTCF%20 instead of XTCTCF
Black
  • 81
  • 1
  • 14