Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <title>Document</title>
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
- </head>
- <body>
- <script type="text/javascript">
- var p = {
- "phone1": "84907193016"
- };
- for (var key in p) {
- if (p.hasOwnProperty(key)) {
- var phone_number = p[key];
- var message = "Test SMS";
- var device_id = 1;
- var obj = [{
- "phone_number": phone_number,
- "message": message,
- "device_id": device_id
- }];
- var mydata = JSON.stringify(obj);
- var settings = {
- "async": true,
- "crossDomain": true,
- "url": "https://smsgateway.me/api/v4/message/send",
- "method": "POST",
- "headers": {
- "Authorization": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJhZG1pbiIsImlhdCI6MTUzNjU4NDczMiwiZXhwIjo0MTAyNDQ0ODAwLCJ1aWQiOjYwOTM0LCJyb2xlcyI6WyJST0xFX1VTRVIiXX0.tiKDXvN-LzdKFjxN_2BI0oJ09dMpaBJey0CKdRbAcFU",
- "Content-Type": "application/json",
- },
- "processData": false,
- data: mydata
- }
- $.ajax(settings).done(function(response) {
- console.log(response);
- });
- }
- }
- </script>
- </body>
- </html>
Add Comment
Please, Sign In to add comment