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
Copy file name to clipboardExpand all lines: README.md
+72-19Lines changed: 72 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ The .Net SDK uses the [Watson Developer Cloud][wdc] services, a collection of RE
17
17
## Before you begin
18
18
Ensure you have the following prerequisites:
19
19
20
-
*An IBM Cloud account. If you don't have one, [sign up][bluemix_registration].
20
+
*You need an [IBM Cloud][ibm-cloud-onboarding] account.
21
21
* Install [Visual Studio][visual-studio-download] for Windows or [Visual Studio Code][visual-studio-code-download] for OSX or Linux.
22
22
* Install [.NET Core][dotnet-core-download].
23
23
@@ -39,6 +39,76 @@ You can get the latest SDK packages through NuGet. Installation instructions can
39
39
40
40
Or manually [here][latest_release].
41
41
42
+
## Authentication
43
+
Watson services are migrating to token-based Identity and Access Management (IAM) authentication.
44
+
45
+
- With some service instances, you authenticate to the API by using **[IAM](#iam)**.
46
+
- In other instances, you authenticate by providing the **[username and password](#username-and-password)** for the service instance.
47
+
- Visual Recognition uses a form of [API key](#api-key) only with instances created before May 23, 2018. Newer instances of Visual Recognition use [IAM](#iam).
48
+
49
+
### Getting credentials
50
+
To find out which authentication to use, view the service credentials. You find the service credentials for authentication the same way for all Watson services:
51
+
52
+
1. Go to the IBM Cloud **[Dashboard][watson-dashboard]** page.
53
+
1. Either click an existing Watson service instance or click **Create**.
54
+
1. Click **Show** to view your service credentials.
55
+
1. Copy the `url` and either `apikey` or `username` and `password`.
56
+
57
+
In your code, you can use these values in the service constructor or with a method call after instantiating your service.
58
+
59
+
### IAM
60
+
61
+
Some services use 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.
62
+
63
+
You supply either an IAM service **API key** or an **access token**:
64
+
65
+
- 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.
66
+
- 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). If you want to switch to API key override your stored IAM credentials with an IAM API key.
**Important**: This type of authentication works only with Visual Recognition instances created before May 23, 2018. Newer instances of Visual Recognition use [IAM](#iam).
You can send custom request headers by adding them to the `customData` object.
44
114
```cs
@@ -72,24 +142,6 @@ void Example()
72
142
}
73
143
```
74
144
75
-
## IAM Authentication
76
-
You can authenticate using IAM rather than username and password or apikey. You can either allow the SDK to manage the token by providing your IAM apikey or manage the token yourself by providing an access token.
77
-
```cs
78
-
voidExample()
79
-
{
80
-
// Provide either an iamApiKey or iamAccessToken to authenticate the service.
Copy file name to clipboardExpand all lines: src/IBM.WatsonDeveloperCloud.Assistant.v1/README.md
-13Lines changed: 0 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,19 +26,6 @@ You complete these steps to implement your application:
26
26
27
27
* Develop your application. You code your application to connect to the Assistant workspace through API calls. You then integrate your app with other systems that you need, including back-end systems and third-party services such as chat services or social media.
28
28
29
-
#### Instantiating and authenticating the service
30
-
Before you can send requests to the service it must be instantiated and credentials must be set.
31
-
```cs
32
-
// create an Assistant Service instance
33
-
AssistantService_assistant=newAssistantService();
34
-
35
-
// set the credentials
36
-
_assistant.SetCredential(<username>, <password>);
37
-
38
-
// set the VersionDate
39
-
_assistant.VersionDate="<version-date>";
40
-
```
41
-
42
29
#### List workspaces
43
30
List existing workspaces for the service instance.
Copy file name to clipboardExpand all lines: src/IBM.WatsonDeveloperCloud.Conversation.v1/README.md
-13Lines changed: 0 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,19 +26,6 @@ You complete these steps to implement your application:
26
26
27
27
* Develop your application. You code your application to connect to the Conversation workspace through API calls. You then integrate your app with other systems that you need, including back-end systems and third-party services such as chat services or social media.
28
28
29
-
#### Instantiating and authenticating the service
30
-
Before you can send requests to the service it must be instantiated and credentials must be set.
The IBM Watson™ [Discovery][discovery] Service uses data analysis combined with cognitive intuition in order to take your unstructured data and enrich it so that you can query it to return the information that you need from it.
23
23
24
-
#### Instantiating and authenticating the service
25
-
Before you can send requests to the service it must be instantiated and credentials must be set.
Creates an environment for the service instance. Note: You can create only one environment per service instance. Attempting to create another environment for the same service instance results in an error. See the [Discovery service home page][discovery-sizing] for additional information about sizing and pricing. To create a free trial environment, specify the value of size as 0 (zero).
Copy file name to clipboardExpand all lines: src/IBM.WatsonDeveloperCloud.NaturalLanguageUnderstanding.v1/README.md
-13Lines changed: 0 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,19 +23,6 @@ Natural Language Understanding uses natural language processing to analyze seman
23
23
24
24
You can create [custom models][custom_models] with Watson Knowledge Studio that can be used to detect custom [entities][entities] and [relations][relations] in Natural Language Understanding.
25
25
26
-
#### Instantiating and authenticating the service
27
-
Before you can send requests to the service it must be instantiated and credentials must be set.
28
-
```cs
29
-
// create a Natural Language Understanding Service instance
The service offers a single `profile` method that accepts up to 20 MB of input data and produces results in JSON or CSV format. The service accepts input in Arabic, English, Japanese, or Spanish and can produce output in a variety of languages.
28
28
29
-
#### Instantiating and authenticating the service
30
-
Before you can send requests to the service it must be instantiated and credentials must be set.
Copy file name to clipboardExpand all lines: src/IBM.WatsonDeveloperCloud.SpeechToText.v1/README.md
+1-11Lines changed: 1 addition & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,17 +37,7 @@ The Speech to Text API consists of the following groups of related calls:
37
37
* Custom corpora provides an HTTP interface for managing the corpora associated with a custom language model. You add a corpus to a custom model to extract words from the corpus into the model's vocabulary.
38
38
39
39
* Custom words provides an HTTP interface for managing individual words in a custom language model. You can add, list, and delete words from a custom model.
40
-
41
-
#### Instantiating and authenticating the service
42
-
Before you can send requests to the service it must be instantiated and credentials must be set.
Retrieves a list of all models available for use with the service. The information includes the name of the model and its minimum sampling rate in Hertz, among other things.
0 commit comments