Skip to content

Commit 6b43b46

Browse files
author
Gareth Terrace
committed
Public API key warning
1 parent 280a307 commit 6b43b46

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ require 'class-Clockwork.php';
2121
### Sending a message
2222

2323
```php
24-
$clockwork = new Clockwork( $API_KEY );
24+
$clockwork = new Clockwork( $API_KEY ); //Be careful not to post your API Keys to public repositories.
2525
$message = array( 'to' => '441234567891', 'message' => 'This is a test!' );
2626
$result = $clockwork->send( $message );
2727
```
@@ -31,7 +31,7 @@ $result = $clockwork->send( $message );
3131
We recommend you use batch sizes of 500 messages or fewer. By limiting the batch size it prevents any timeouts when sending.
3232

3333
```php
34-
$clockwork = new Clockwork( $API_KEY );
34+
$clockwork = new Clockwork( $API_KEY ); //Be careful not to post your API Keys to public repositories.
3535
$messages = array(
3636
array( 'to' => '441234567891', 'message' => 'This is a test!' ),
3737
array( 'to' => '441234567892', 'message' => 'This is a test 2!' )
@@ -109,7 +109,7 @@ For example, if you send to invalid phone number "abc":
109109
Check your available SMS balance:
110110

111111
```php
112-
$clockwork = new Clockwork( $API_KEY );
112+
$clockwork = new Clockwork( $API_KEY ); //Be careful not to post your API Keys to public repositories.
113113
$clockwork->checkBalance();
114114
```
115115

@@ -185,7 +185,7 @@ In this example both messages will be sent from Clockwork:
185185

186186
```php
187187
$options = array( 'from' => 'Clockwork' );
188-
$clockwork = new Clockwork( $API_KEY, $options );
188+
$clockwork = new Clockwork( $API_KEY, $options ); //Be careful not to post your API Keys to public repositories.
189189
$messages = array(
190190
array( 'to' => '441234567891', 'message' => 'This is a test!' ),
191191
array( 'to' => '441234567892', 'message' => 'This is a test 2!' )
@@ -200,7 +200,7 @@ Set option values individually on each message.
200200
In this example, one message will be from Clockwork and the other from 84433:
201201

202202
```php
203-
$clockwork = new Clockwork( $API_KEY, $options );
203+
$clockwork = new Clockwork( $API_KEY, $options ); //Be careful not to post your API Keys to public repositories.
204204
$messages = array(
205205
array( 'to' => '441234567891', 'message' => 'This is a test!', 'from' => 'Clockwork' ),
206206
array( 'to' => '441234567892', 'message' => 'This is a test 2!', 'from' => '84433' )
@@ -228,7 +228,7 @@ If you're seeing this error there are two fixes available, the first is easy, si
228228

229229
```php
230230
$options = array( 'ssl' => false );
231-
$clockwork = new Clockwork( $API_KEY, $options );
231+
$clockwork = new Clockwork( $API_KEY, $options ); //Be careful not to post your API Keys to public repositories.
232232
```
233233

234234
#### Setup SSL root certificates on your server
@@ -254,3 +254,4 @@ and submit a pull request.
254254
[1]: mailto:hello@clockworksms.com
255255
[2]: http://www.clockworksms.com/
256256
[3]: https://github.com/mediaburst/clockwork-php
257+

0 commit comments

Comments
 (0)