Skip to content

Commit 08ec783

Browse files
committed
docs(Updated readme to include authentication using ibm-credentials.env):
1 parent 0474b52 commit 08ec783

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,25 @@ void Example()
101101
}
102102
```
103103

104+
### ibm-credentials.env
105+
You can create an ibm-credentials.env file for authentication. This has the basic format
106+
```
107+
VISUAL_RECOGNITION_APIKEY=<visual-recognition-apikey>
108+
VISUAL_RECOGNITION_URL=<visual-recognition-service-url>
109+
ASSISTANT_APIKEY=<assistant-apikey>
110+
ASSISTANT_URL=<assistant-service-url>
111+
```
112+
The SDK will search for this file in the following order
113+
- Path specified by environmental variable `IBM_CREDENTIALS_FILE`
114+
- User's home directory
115+
- Top level of the project directory
116+
117+
Using a `ibm-credentials.env` file you can easily instantiate and authenticate a service.
118+
```
119+
AssistantService assistantService = new AssistantService();
120+
var listWorkspacesResult = assistantService.ListWorkspaces();
121+
```
122+
104123
## Custom Request Headers
105124
You can send custom request headers by adding them to the `customData` object.
106125
```cs

0 commit comments

Comments
 (0)