Skip to content

Commit 6d7fb8f

Browse files
docs: update readme and secrets baseline
1 parent f9cd926 commit 6d7fb8f

2 files changed

Lines changed: 40 additions & 15 deletions

File tree

‎.secrets.baseline‎

Lines changed: 23 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎README.md‎

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ discovery = DiscoveryV1(version='2019-04-30',
176176
discovery.set_service_url('<url_as_per_region>')
177177
```
178178

179-
### Username and password
179+
#### Username and password
180180

181181
```python
182182
from ibm_watson import DiscoveryV1
@@ -187,7 +187,7 @@ discovery = DiscoveryV1(version='2019-04-30', authenticator=authenticator)
187187
discovery.set_service_url('<url_as_per_region>')
188188
```
189189

190-
### No Authentication
190+
#### No Authentication
191191

192192
```python
193193
from ibm_watson import DiscoveryV1
@@ -198,6 +198,21 @@ discovery = DiscoveryV1(version='2019-04-30', authenticator=authenticator)
198198
discovery.set_service_url('<url_as_per_region>')
199199
```
200200

201+
### MCSP
202+
203+
To use the SDK through a third party cloud provider (such as AWS), use the `MCSPAuthenticator`. This will require the base endpoint URL for the MCSP token service (e.g. https://iam.platform.saas.ibm.com) and an apikey.
204+
205+
```python
206+
from ibm_watson import AssistantV2
207+
from ibm_cloud_sdk_core.authenticators import MCSPAuthenticator
208+
209+
# In the constructor, letting the SDK manage the token
210+
authenticator = MCSPAuthenticator('apikey', 'token_service_endpoint')
211+
assistant = AssistantV2(version='2023-06-15',
212+
authenticator=authenticator)
213+
assistant.set_service_url('<url_as_per_region>')
214+
```
215+
201216
## Python version
202217

203218
Tested on Python 3.9, 3.10, and 3.11.

0 commit comments

Comments
 (0)