I am writing a PERL script to call the API on my router with some Curl commands. I want to send an SMS. So far I have managed to obtain tokens and login via the API (I am using sha256 and base64 to hash and encode the password into the correct format) but I cannot send an SMS. I keep getting error '100003' (Access denied). I have obtained the Session ID and Token from 'http://192.168.8.1/api/webserver/SesTokInfo'. Should I be using the same Session ID and Token as I logged in with or should I update them from 'SesTokInfo'?
Here is the section of code I am using:
my $message_data = "<request><Index>-1</Index><Phones><Phone>$PHONE_NUMBER</Phone></Phones><Sca></Sca><Content>hello</Content><Length>5</Length><Reserved>1</Reserved><Date>2020-02-17 02:00</Date></request>";
Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
Politically sensitive content
Content concerning pornography, gambling, and drug abuse
Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " User Agreement."