Earning an HTTP Request into My Country Mobile
Additionally, there are lots of methods by which you may make an HTTP request towards the My Country Mobile API. You may earn a raw HTTP petition on your code (as an instance, employing a module such as acquired in NodeJS) or with an instrument such as Postman. You may discover that it’s simpler to use the My Country Mobile Helper Library or even SDK on the favorite programming language – even when that is a celebration. Also, you have to use My Country Mobile CLI.
All ask into My Country Mobile’s relaxation API has to get authenticated. My Country Mobile supports two kinds of authentication, either with HTTP basic auth, that utilize the Subsequent username/password approaches.
Account SID along with Auth Token
The accounts SID and also auth token would be the master keys into your accounts. They can Be Located on your own Account Dash Board from the My Country Mobile Console.
API Keys are certificate you may make and reverse from the Console or utilizing the API together with your accounts and AuthToken. API Keys tend to be simpler to do the job together on your My Country Mobile endeavors. You may instantly delete to revoke access should they get endangered and produce a new brand new API crucial for unique usage situations – hence, should you will need to show away a certain usage scenario for a certain motive, you may simply delete that the API primary!
This is how most of these techniques may be useful for a few among My Country Mobile’s very frequent tools: that the SMS concept ReSource.
Building or Updating Assets using all the Submit Technique
You may produce or upgrade a new resource working with the HTTP POST system in the source URI. All you could have to present would be your outline of exactly what it’s you would like to generate! Even My Country Mobile assistant libraries are helping to make these orders more straightforward. Nevertheless, you also may observe the parameters to get virtually any article petition at the documentation to get an origin. Here is a publish petition that’ll make and deliver an SMS working with the My Country Mobile API.
Congrats on delivering a note! You may see from the outcome which you will be given a note SID, which looks something such as M-M accompanied closely by a lengthy series of letters and amounts. From the sample outcome signal, it has only a very long series of X. You may utilize that SID to recover info regarding the content working with the GET method.
At length, you’ll find instances in which you may like to delete the information. You may use the same communication SID to generate an HTTP DELETE request. Be aware that maybe not all of My Country Mobile relaxation API tools assist DELETE.
My Country Mobile relaxation API tools
Since you create those orders, you are going to observe answers, suggesting what is occurring about the opposite hand of this host. Listed below is a list of shared standing codes you are going to notice in reaction contrary to your My Country Mobile API, and also voice exactly what exactly they believe.
20-1 produced The petition is powerful; we generate a fresh resource, and also the answer human body comprises the representation. This would just seem to publish requests. 204Okay Combined together with all the DELETE Systems. The petition was more powerful; the source had also been deleting.
302discovered a mutual divert answer; you could procure the representation in the URI from the Location response header. 304perhaps not altered Your customer’s cached variant of this representation continues to be current. 4 0 4 NOT discovered The petition resource was not discovered. 405Prohibited an Average of implies that you can not DELETE the source.
429way too many REQUESTS The application will be sending a lot of requests as well fast, and you’re attaining the concurrency limitation of this My Country Mobile API. Five hundred SERVER ERRORwe’re able to not go back the representation because of an internal host mistake – that 1 is My Country Mobile’s mistake! 503assistance UNAVAILABLEWe’s unable to reunite the representation. Please wait for a little and decide to try yet again.