Using wget and curl for Debugging
There are several tools that can be used to aid testing of any of the POSTs. Below are two examples for
querying a Toll-Free Numbers (TFNs) that can be used in a UNIX environment. Be sure to replace the MyUserID and MyPass with proper values. Also note that the use of single and double quotes in the examples below is likely to be important to avoid command shell issues. Similarly, your shell may need to escape (backslash) special
characters.
The wget tool can issue a query POST similar to this example:
/bin/wget --no-check-certificate \
--header="Content-Type: application/json" -O - \
--post-data='{"id":"MyUserID", "pwd":"MyPass", \
"tfn":"8005551212"}' \
https://texting.somos.com/api/v2/tss-text-query-tfn
The curl tool can also issue a query POST similar to this example:
/usr/bin/curl --insecure -i -H "Content-Type: application/json" -X \
POST -d '{"id":"MyUserID", "pwd":"MyPass", \
"tfn":"8005551212"}' \
https://texting.somos.com/api/v2/tss-text-query-tfn
These are 3rd party tools that may also have “man” pages on your operating system. More information
about the tools can be found via a web search engine.