Skip to content

Commit cf0fdfb

Browse files
authored
Update README.md
1 parent f8ea95a commit cf0fdfb

File tree

1 file changed

+14
-1
lines changed
  • src/IBM.WatsonDeveloperCloud.NaturalLanguageClassifier.v1

1 file changed

+14
-1
lines changed

src/IBM.WatsonDeveloperCloud.NaturalLanguageClassifier.v1/README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,20 @@ IBM Watson™ Natural Language Classifier can help your application understand t
2424
You can create and train a classifier in less than 15 minutes.
2525

2626
#### Instantiating and authenticating the service
27-
Before you can send requests to the service it must be instantiated and credentials must be set.
27+
Before you can send requests to the service it must be instantiated and api key or access token must be set.
28+
```cs
29+
TokenOptions tokenOptions = new TokenOptions()
30+
{
31+
IamApiKey = "<iam-apikey>",
32+
IamAccessToken = "<iam-access-token>",
33+
IamUrl = "<service-endpoint>"
34+
};
35+
36+
var _naturalLanguageClassifierService = new NaturalLanguageClassifierService(tokenOptions);
37+
38+
```
39+
40+
You can also authenticate using username and password.
2841
```cs
2942
// create a Natural Language Classifier Service instance
3043
NaturalLanguageClassifierService _naturalLanguageClassifierService = new NaturalLanguageClassifierService();

0 commit comments

Comments
 (0)