From 4b32d0470d4d2d374baf6e84c5fca29497069a66 Mon Sep 17 00:00:00 2001 From: olivierapivideo Date: Mon, 4 Oct 2021 08:37:44 +0000 Subject: [PATCH] feat(nodejs) update readme --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 3265c62..22161a9 100644 --- a/README.md +++ b/README.md @@ -281,6 +281,14 @@ All you have to do is provide an API token when instantiating the ApiVideoClient const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); ``` +### Get the access token + +If you need to access the access-token value obtained using the API key, you can use the getAccessToken() method of the client: +```js +const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); +const accessToken = await client.getAccessToken(); +``` + ### Public endpoints Some endpoints don't require authentication. These one can be called with an ApiVideoClient instantiated without API token: