# oauth.v2.access

> Add to Slaiky: trade the install code for that workspace’s bot token (client id and secret).

Source: https://slaiky.xyz/docs/reference/methods/oauth.v2.access

No Authorization header.

`POST https://app.slaiky.xyz/api/methods/oauth.v2.access` · needs no token

## Arguments

| Argument | Type | Required | What |
| --- | --- | --- | --- |
| `clientId` | string | yes | 1–80 characters. |
| `clientSecret` | string | yes | 1–200 characters. |
| `code` | string | yes | 1–200 characters. |
| `redirectUri` | URL | no | Up to 2,000 characters. |

## Answer

`{ "ok": true, … }` with: accessToken: string, tokenType: "bot", scope: string, botUserId: string, appId: string, team: { id, name, slug }. A refusal is `{ "ok": false, "error": { "code", "message" } }` ([errors](/docs/errors)).

## Example

The required arguments, with placeholders in angle brackets.

*you run*

```sh

curl -s https://app.slaiky.xyz/api/methods/oauth.v2.access \
  -H 'content-type: application/json' \
  -d '{"clientId":"<clientId>","clientSecret":"<clientSecret>","code":"<code>"}'

```
