Skip to content

Commit 3418bc6

Browse files
Merge pull request #34 from apivideo/nodejs-access-token-getter
feat(nodejs) update readme
2 parents cb5ec14 + 4b32d04 commit 3418bc6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,14 @@ All you have to do is provide an API token when instantiating the ApiVideoClient
281281
const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" });
282282
```
283283

284+
### Get the access token
285+
286+
If you need to access the access-token value obtained using the API key, you can use the getAccessToken() method of the client:
287+
```js
288+
const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" });
289+
const accessToken = await client.getAccessToken();
290+
```
291+
284292
### Public endpoints
285293

286294
Some endpoints don't require authentication. These one can be called with an ApiVideoClient instantiated without API token:

0 commit comments

Comments
 (0)