File tree Expand file tree Collapse file tree 1 file changed +12
-11
lines changed
Expand file tree Collapse file tree 1 file changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -18,25 +18,26 @@ pip install emailable
1818
1919## Usage
2020
21- The library needs to be configured with your account's API key which is available in your [ Emailable Dashboard ] ( https://app.emailable.com/api ) .
21+ ### Authentication
2222
23- ### Setup
23+ The Emailable API requires either an API key or an access token for
24+ authentication. API keys can be created and managed in the
25+ [ Emailable Dashboard] ( https://app.emailable.com/api ) .
2426
25- When using an API key you can initialize the client to use it for all future
26- requests.
27+ An API key can be set globally for the Emailable client:
2728
2829``` python
29- import emailable
30-
31- client = emailable.Client(' live_...' )
30+ client = emailable.Client(' your_api_key' )
3231```
3332
34- Alternatively, you can pass an OAuth access token to any of the endpoints. See
35- [ here] ( https://emailable.com/docs/api/#oauth ) for more details.
33+ Or, you can specify an ` api_key ` or an ` access_token ` with each request:
3634
3735``` python
38- client = emailable.Client()
39- client.verify(
' [email protected] ' ,
access_token = < access_token
> )
36+ # set api_key at request time
37+ client.verify(api_key = ' your_api_key' )
38+
39+ # set access_token at request time
40+ client.verify(access_token = ' your_access_token' )
4041```
4142
4243### Verification
You can’t perform that action at this time.
0 commit comments