Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/enigma972/orange-api-client
Orange APIs Client with Token Caching
https://github.com/enigma972/orange-api-client
orange-api orange-sms orange-sms-api orange-smsapi php sdk sms
Last synced: 5 days ago
JSON representation
Orange APIs Client with Token Caching
- Host: GitHub
- URL: https://github.com/enigma972/orange-api-client
- Owner: enigma972
- Created: 2021-06-28T08:52:39.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-12-05T18:16:37.000Z (almost 3 years ago)
- Last Synced: 2024-09-26T23:19:30.382Z (about 2 months ago)
- Topics: orange-api, orange-sms, orange-sms-api, orange-smsapi, php, sdk, sms
- Language: PHP
- Homepage:
- Size: 16.6 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Orange API Client (SDK)
Orange APIs Client with Token Caching## Installation
You need to have composer installed in your computer before doing this
```bash
composer require enigma972/orange-api-client
```## Quick setup and Basic example (SMS)
Get `client_id` and `client_secret` [here](https://developer.orange.com/myapps/)
All examples [here](https://github.com/enigma972/orange-api-client/tree/main/examples/Sms)
```php
content('Hello world, via Orange SMS API.')
->from(243899999999)
->as('Enigma972')
->to(243899999999)
;$response = $sms->doSend($message);
dd($response->toArray());
```
If all is ok, $response should be like this :```
^ array:1 [▼
"outboundSMSMessageRequest" => array:4 [▼
"address" => array:1 [▼
0 => "tel:+243899999999"
]
"senderAddress" => "tel:+243899999999"
"outboundSMSTextMessage" => array:1 [▼
"message" => "Hello world, via Orange SMS API."
]
"resourceURL" => "https://api.orange.com/smsmessaging/v1/outbound/tel:+243899999999/requests/2fdd2d6e-c155-43d3-97ef-1dce0dc648d5"
]
]
```Also read [ismaeltoe/osms](https://github.com/ismaeltoe/osms) and [informagenie/orange-sms](https://github.com/informagenie/orange-sms).