{"id":33991152,"url":"https://github.com/smsgateway24/smsgateway24-php-sdk","last_synced_at":"2025-12-13T06:39:44.188Z","repository":{"id":48983406,"uuid":"267833978","full_name":"smsgateway24/smsgateway24-php-sdk","owner":"smsgateway24","description":"smsgateway24-php-sdk","archived":false,"fork":false,"pushed_at":"2023-01-12T09:28:37.000Z","size":46,"stargazers_count":9,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-12T02:34:40.445Z","etag":null,"topics":["php-library","php-sdk","sms"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/smsgateway24.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-29T10:47:24.000Z","updated_at":"2023-02-21T15:17:58.000Z","dependencies_parsed_at":"2023-02-09T11:01:54.567Z","dependency_job_id":null,"html_url":"https://github.com/smsgateway24/smsgateway24-php-sdk","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/smsgateway24/smsgateway24-php-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smsgateway24%2Fsmsgateway24-php-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smsgateway24%2Fsmsgateway24-php-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smsgateway24%2Fsmsgateway24-php-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smsgateway24%2Fsmsgateway24-php-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smsgateway24","download_url":"https://codeload.github.com/smsgateway24/smsgateway24-php-sdk/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smsgateway24%2Fsmsgateway24-php-sdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27701754,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-13T02:00:09.769Z","response_time":147,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["php-library","php-sdk","sms"],"created_at":"2025-12-13T06:39:43.490Z","updated_at":"2025-12-13T06:39:44.182Z","avatar_url":"https://github.com/smsgateway24.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SmsGateWay24\n\nSmsGateWay24 is a service that can turn you android phone to gateway and you can start sending messages throw it.\n\n## PHP SDK\n\nPHP library for SmsGateWay24 API interaction.\n\nRequires:\n* PHP 7.1+\n\nHere's a demo of how you can use it:\n\n```php\n\nuse \\SmsGateway24\\SmsGateway24;\n\n$gateway = new SmsGateway24('your-api-token-here'); // get it in your profile\n\n$to = \"+4915752982212\";  //required. Target Phone number\n$message = \"Hello, how are you?\"; // required. Body Message. \n$deviceId = 10403; //required.  get it in your profile after app installation on your android\n$sim=0;  // Optional. 0 or 1. For Dual SIM devices. (if you skip it -\u003e default sim is  0)\n$timeToSend = \"2022-01-12 00:00:00\"; // Optional. time when you want to send SMS\n$customerid = 12; // Optional. your internal customer ID.\n$urgent = 1; // Optional. 1 or 0 to make sms Urgent.\n$smsId = $gateway-\u003eaddSms($to, $message, $deviceId, $timeToSend, $sim, $customerid, $urgent);\n\n\n\n```\n\nAfter that, the phone with the Smsgateway24 application calls the server and takes the SMS and sends it from your sim card.\n\n\n### Getting Started\nVisit our [website](https://smsgateway24.com/), sign up and install app on your phone. Get your API token and device id.\n\n\nInstall the package via composer:\n```bash\ncomposer require smsgateway24/smsgateway24-php-sdk\n```\n\n### API Methods\n\n#### Add SMS to queue\n\nCreates SMS on the server to send.\n\n```php\nuse \\SmsGateway24\\SmsGateway24;\n\n$gateway = new SmsGateway24('your-api-token-here'); // get it in your profile\n\n$to = \"+4915752982212\";  //required. Target Phone number\n$message = \"Hello, how are you?\"; // required. Body Message. \n$deviceId = 10403; //required.  get it in your profile after app installation on your android\n$sim=0;  // Optional. 0 or 1. For Dual SIM devices. (if you skip it -\u003e default sim is  0)\n$timeToSend = \"2022-01-12 00:00:00\"; // Optional. time when you want to send SMS\n$customerid = 12; // Optional. your internal customer ID.\n$urgent = 1; // Optional. 1 or 0 to make sms Urgent.\n$smsId = $gateway-\u003eaddSms($to, $message, $deviceId, $timeToSend, $sim, $customerid, $urgent);\n\n\necho $smsId; \n```\n\n#### Get SMS status\n\nYou can find out the status of each SMS using this method\n\n```php\nuse \\SmsGateway24\\SmsGateway24;\n\n$gateway = new SmsGateway24('your-api-token-here'); // get it in your profile\n\n$smsId = 12345;\n\n$statusResult = $gateway-\u003egetSmsStatus($smsId);\n\nprint_r($statusResult);\n/*\nStatuses values: \n1 - New (just created)\n2 - Taken from Server. The phone picked up the SMS from the server, but there is no information about the delivery yet. \n5 - Income. \n6 - Sent by Phone. Good status. The phone sent a text message. But there is no information about the delivery yet. \n7 - Delivered. Good status. The phone texted and it was 100% delivered by the operator. The delivery status was sent to the server. (You need a webhook to your server - we have one! Write your server in the device settings on the website)\n8 - Sms Not Delivered. The text message was not delivered. This usually means that the SIM card is blocked or the balance is negative\n9 - Not SENT - Generic failure. The text message was not delivered. This usually means that the SIM card is blocked or the balance is negative\n10 - Not sent - No service. \n11 - Not Sent - Null PD.\n12 - Not Sent - Radio off.\n100 - not sent - NOT ALLOWED. Click the permission button in the app\n101 - not sent - Not Allowed At all. Click the permission button in the app\n*/\n```\n\n#### Get device status\n\n```php\nuse \\SmsGateway24\\SmsGateway24;\n\n$gateway = new SmsGateway24('your-api-token-here'); // get it in your profile\n\n$deviceId = 12345; // get it in your profile\n\n$statusResult = $gateway-\u003egetDeviceStatus($deviceId);\n\nprint_r($statusResult);\n```\n\n#### Add Tag\n\nAdd contacts for any tag. For example, for the tag * Employees * your colleagues will perfectly fit.\n\n```php\nuse \\SmsGateway24\\SmsGateway24;\n\n$gateway = new SmsGateway24('your-api-token-here'); // get it in your profile\n\n$tagId = $gateway-\u003esaveTag(\"Rich customers\");\n\necho $tagId;\n```\n\n#### Save Contact\n\nAdd contacts for any tag. For example, for the tag * Employees * your colleagues will perfectly fit.\n\n```php\nuse \\SmsGateway24\\SmsGateway24;\n\n$gateway = new SmsGateway24('your-api-token-here'); // get it in your profile\n\n$contactName = 'Support SmsGateWay24';\n$phoneNum = '+4915752982212';\n$tagId = 2456;\n\n$contactId = $gateway-\u003esaveContact($contactName, $phoneNum, $tagId);\n\necho $contactId;\n```\n\n#### Create a Newsletter\n\nOnce you have created the tag, you can do the mailing on the tag phones.\n\n```php\nuse \\SmsGateway24\\SmsGateway24;\n\n$gateway = new SmsGateway24('your-api-token-here'); // get it in your profile\n\n$paketTitle = 'some title';\n$deviceId = 1234; // get it in your profile\n$body = 'body text';\n$tags = [12, 13, 14]; // ids\n\n$paketId = $gateway-\u003esavePaket($paketTitle, $deviceId, $body, $tags);\n\necho $paketId;\n```\n\n## Contributing\nContributions are welcome!\n\n## Credits\n* [Igor](https://github.com/underwear/)\n* [Nik](https://github.com/nikitospush/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmsgateway24%2Fsmsgateway24-php-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmsgateway24%2Fsmsgateway24-php-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmsgateway24%2Fsmsgateway24-php-sdk/lists"}