Skip to content

Commit ce1d69a

Browse files
committed
Updated the README
1 parent 637ce07 commit ce1d69a

1 file changed

Lines changed: 14 additions & 7 deletions

File tree

README.md

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,24 @@ Or install it yourself as:
3030

3131
## Usage
3232

33-
The library needs to be configured with your account's API key which is
34-
available in your [Emailable Dashboard](https://app.emailable.com/api). Set
35-
`Emailable.api_key` to its value:
33+
### Authentication
3634

37-
### Setup
35+
The Emailable API can be authenticated with in a few ways. You will need an API key or an Access Token to authenticate. API keys are available in your [Emailable Dashboard](https://app.emailable.com/api).
36+
37+
The library can be configured globally with your account's API key
38+
39+
```ruby
40+
Emailable.api_key = 'your_api_key
41+
```
42+
43+
Alternatively, you can pass an `api_key` or an `access_token` at request time to any of the endpoint methods.
3844
3945
```ruby
40-
require 'emailable'
46+
# set api_key at request time
47+
Emailable.verify(api_key: 'your_api_key')
4148
42-
# set api key
43-
Emailable.api_key = 'live_...'
49+
# set access_token at request_time
50+
Emailable.verify(access_token: 'your_access_token')
4451
```
4552
4653
### Verification

0 commit comments

Comments
 (0)