# Login prerequisite

`GET /api/v1/oauth-clients/local`

You need to retrieve a client id and secret before [logging in](#operation/getOAuthToken).

Authentication: no security requirement declared for this operation.

Responses:

- 200: successful operation

Content type: application/json

Type: OAuthClient

Schema: [OAuthClient](https://sourcey-peertube.pages.dev/api-rest-reference/models/oauthclient.md)

- `client_id` (optional)
  Type: string
  
  minLength: 32
  
  maxLength: 32
  
  pattern: "/^[a-z0-9]$/"
  
  Example:
  
  ```json
  "v1ikx5hnfop4mdpnci8nsqh93c45rldf"
  ```

- `client_secret` (optional)
  Type: string
  
  minLength: 32
  
  maxLength: 32
  
  pattern: "/^[a-zA-Z0-9]$/"
  
  Example:
  
  ```json
  "AjWiOapPltI6EnsWQwlFarRtLh4u8tDt"
  ```

## Examples

### Shell

```Shell
API="https://peertube2.cpy.re/api/v1"

## AUTH
curl -s "$API/oauth-clients/local"
```
