You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are two ways to supply the credentials you found above to the SDK for authentication.
@@ -137,12 +134,20 @@ If you'd prefer to set authentication values manually in your code, the SDK supp
137
134
138
135
### IAM
139
136
140
-
IBM Cloud is migrating to token-based Identity and Access Management (IAM) authentication. IAM authentication uses a service API key to get an access token that is passed with the call. Access tokens are valid for approximately one hour and must be regenerated.
137
+
IBM Cloud has migrated to token-based Identity and Access Management (IAM) authentication. IAM authentication uses a service API key to get an access token that is passed with the call. Access tokens are valid for approximately one hour and must be regenerated.
141
138
142
139
You supply either an IAM service **API key** or an **access token**:
143
140
144
141
- Use the API key to have the SDK manage the lifecycle of the access token. The SDK requests an access token, ensures that the access token is valid, and refreshes it if necessary.
145
142
- Use the access token if you want to manage the lifecycle yourself. For details, see [Authenticating with IAM tokens](https://console.bluemix.net/docs/services/watson/getting-started-iam.html).
143
+
- Use a server-side to generate access tokens using your IAM API key for untrusted environments like client-side scripts. The generated access tokens will be valid for one hour and can be refreshed.
144
+
145
+
### Generating access tokens using IAM API key
146
+
```python
147
+
# In your API endpoint use this to generate new access tokens
0 commit comments