Skip to content

Commit 6c3c80a

Browse files
authored
Update README.md
1 parent 3fc5231 commit 6c3c80a

File tree

1 file changed

+13
-1
lines changed
  • src/IBM.WatsonDeveloperCloud.LanguageTranslator.v2

1 file changed

+13
-1
lines changed

src/IBM.WatsonDeveloperCloud.LanguageTranslator.v2/README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,19 @@ PM > Install-Package IBM.WatsonDeveloperCloud.LanguageTranslator.v2
2323
Select a domain, then identify or select the language of text, and then translate the text from one supported language to another.
2424

2525
#### Instantiating and authenticating the service
26-
Before you can send requests to the service it must be instantiated and credentials must be set.
26+
Before you can send requests to the service it must be instantiated and api key or access token must be set.
27+
```cs
28+
TokenOptions tokenOptions = new TokenOptions()
29+
{
30+
IamApiKey = "<iam-apikey>",
31+
IamAccessToken = "<iam-access-token>",
32+
IamUrl = "<service-endpoint>"
33+
};
34+
35+
var _languageTranslator = new LanguageTranslator(tokenOptions, "<version-date>");
36+
```
37+
38+
Services created before 2018-06-15 are authenticated using username and password..
2739
```cs
2840
// create a Language Translator Service instance
2941
LanguageTranslationService _languageTranslator = new LanguageTranslationService();

0 commit comments

Comments
 (0)