> For the complete documentation index, see [llms.txt](https://developer.mediarithmics.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.mediarithmics.io/advanced-usages/plugins/creation/destinations-and-authentication/configuring-a-plugin-version.md).

# Configuring a plugin version

## Configuring a plugin version

Before implementing authentication methods in your plugin code, you need to configure the plugin version in the **Computing Console**. This configuration tells the platform which auth type to use, how to render the authentication form, and at which level each property should be set.

### 1. Set the authentication type

In Computing Console, open the plugin version configuration page and set the **Authentication type** field to one of the following values:

| Value          | Auth flow triggered                                                                                                                 |
| -------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| `NO_AUTH`      | No authentication step. Destination creation skips the auth modal.                                                                  |
| `OAUTH2`       | OAuth 2.0 redirect flow. The platform calls `onCreateOAuthRedirectUrl`, then `onAuthentication`, then `onTestAuthentication`.       |
| `INPUT_FIELDS` | A form is generated from the fields defined in your layout file. The platform calls `onAuthentication` then `onTestAuthentication`. |

{% hint style="info" %}
Use `INPUT_FIELDS` for both the `TOKEN` and `LOGIN_PASSWORD` authentication types. The difference between them is entirely defined by the fields you declare in the layout (one secret field for a token, two fields for login/password).
{% endhint %}

### 2. Update the plugin layout for `INPUT_FIELDS`

When using `INPUT_FIELDS`, the authentication form displayed to the user is generated from the `authentication` section of your plugin layout file. Update `PluginLayoutAuthenticationResource` to include a `fields` list:

```typescript
{
  "authentication": {
    "type": "INPUT_FIELDS",
    "fields": [
      {
        "name": "api_token",
        "label": "API Token",
        "secret": true,
        "required": true
      }
    ]
  }
}
```

For a login/password form, declare two fields:

```typescript
{
  "authentication": {
    "type": "INPUT_FIELDS",
    "fields": [
      {
        "name": "login",
        "label": "Login",
        "secret": false,
        "required": true
      },
      {
        "name": "password",
        "label": "Password",
        "secret": true,
        "required": true
      }
    ]
  }
}
```

For `OAUTH2`, the layout only needs to declare the button that triggers the redirect:

```typescript
{
  "authentication": {
    "type": "OAUTH2",
    "buttonLabel": "Connect with Partner"
  }
}
```

### 3. Display plugin properties

**In the layout file**, group properties under the matching section so the UI renders them at the right step:

```typescript
{
  "sections": [
    {
      "title": "Preset configuration",
      "fields": [
        { "property_technical_name": "partner_account_id" }
      ]
    },
    {
      "title": "Feed configuration",
      "fields": [
        { "property_technical_name": "segment_name" },
        { "property_technical_name": "partner_segment_id" }
      ]
    }
  ]
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developer.mediarithmics.io/advanced-usages/plugins/creation/destinations-and-authentication/configuring-a-plugin-version.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
