You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For OAuth2 Flow - see https://jsapi.apiary.io/apis/clickup20/introduction/authentication.html and https://jsapi.apiary.io/apis/clickup20/reference/0/authorization/get-access-token.html
8
+
9
+
```
10
+
var apitokens = new ParamsAccessToken(clientId, clientId, code);
11
+
var api = ClickUpApi.Create(apitokens);
12
+
var getTeamsResponse = api.GetAuthorizedTeams();
13
+
if (getTeamsResponse.RequestStatus != HttpStatusCode.OK || !getTeamsResponse.ResponseSuccess.Teams.Any())
14
+
throw new AuthorisationException("Could not find any teams you are part of.");
15
+
```
16
+
17
+
For Personal Token - see https://jsapi.apiary.io/apis/clickup20/introduction/authentication.html
18
+
19
+
```
20
+
var api = new ClickUpApi(personalToken);
21
+
var getTeamsResponse = api.GetAuthorizedTeams();
22
+
if (getTeamsResponse.RequestStatus != HttpStatusCode.OK || !getTeamsResponse.ResponseSuccess.Teams.Any())
23
+
throw new AuthorisationException("Could not find any teams you are part of.");
0 commit comments