Skip to content

Commit 5425ba5

Browse files
author
Adam Weeks
committed
docs: add service-app token quick start
1 parent dd89e8f commit 5425ba5

1 file changed

Lines changed: 13 additions & 3 deletions

File tree

README.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,28 @@ Until publication, install from a local checkout:
1717
python3 -m pip install -e .
1818
```
1919

20-
## Authenticate
20+
## Quick start with a service-app token
2121

22-
For an already-issued service-app token, use a static provider:
22+
1. Create and authorize a [Webex Service App](https://developer.webex.com/create/docs/service-apps).
23+
2. Select `spark-admin:datasource_read` to list data sources and
24+
`spark-admin:datasource_write` to register, update, or extend them. See the
25+
[Data Sources API reference](https://developer.webex.com/webex-contact-center/docs/api/v1/data-sources)
26+
for the required permissions.
27+
3. Retrieve the authorized service app's access token and pass it directly to
28+
the SDK from your application's secret source. Do not commit it or embed it
29+
in source code.
2330

2431
```python
2532
from webex_byods import StaticAccessTokenProvider, WebexDataSourceClient
2633

2734
client = WebexDataSourceClient(
28-
token_provider=StaticAccessTokenProvider("service-app-access-token")
35+
token_provider=StaticAccessTokenProvider(service_app_access_token)
2936
)
37+
data_sources = client.list_all_data_sources()
3038
```
3139

40+
## Refresh service-app tokens
41+
3242
For automatic service-app token acquisition, the host application supplies
3343
credentials and a personal-token provider. It can obtain those values from its
3444
own configuration, AWS Secrets Manager, or another secret system.

0 commit comments

Comments
 (0)