---
title: "Reconnect OAuth connection"
method: POST
path: "/oauth_providers/reconnect"
tags: ["Oauth Providers"]
---

# Reconnect OAuth connection

`POST /oauth_providers/reconnect`

## Request

- Base URL: `https://www.saltedge.com/api/v5`
- URL: `https://www.saltedge.com/api/v5/oauth_providers/reconnect`
- Auth: API key in header `App-id` and API key in header `Secret`
- TypeScript: <https://skmtc.dev/saltedge/apis/salt-edge-account-information-api/docs/oauth_providers/reconnect/post.ts> (a function with typed inputs; its response is checked against the schema)

Used to reconnect a connection for an OAuth provider.
After receiving the response, the customer will be redirected to the `return_to` URL.

Mobile clients receive a `connection_secret` parameter in the `return_to` URL if the connection was successfully connected and an `error_message` parameter if the connection failed to connect for some reason.

## Request body

- OauthReconnectRequestBody
  - `data` object, required
    - `connection_id` string, required: the `id` of the connection that is to be reconnected
    - `consent` ConsentRequestBody, required
      - `scopes` string[], required: data to be allowed for fetching. The allowed values for this parameter must fall within the client's `allowed_fetch_scopes` and/or provider's `supported_fetch_scopes` restrictions. To change the client's allowed scopes, please <a href='https://www.saltedge.com/pages/contact' target="_blank">contact our Sales team</a>. <strong>Note:</strong> `account_details` scope covers both `accounts` and `accounts_without_balance` attempt's [fetch_scopes](#attempts).<br>
      - `from_date` string, date: date to be allowed for fetching the data from. This parameter is used when `scopes` parameter contains `transactions_details`. The allowed values for this parameter must be within exactly 365 days ago.
      - `to_date` string, date, nullable: date to be allowed for fetching the data until. The allowed values for this parameter must be equal or more than `from_date`.
      - `period_days` integer: determines the period the consent will be valid for. Defaults to `null` (limitless) or provider's `max_consent_days`. The allowed value for this parameter must not be higher than the provider's `max_consent_days`.
    - `attempt` AttemptRequestBody
      - `fetch_scopes` string[]: fetching mode. Defaults to [consent](#consents-object) scopes. The allowed values for this parameter must comply to the [consent](#consents-object) `scopes` restriction.
      - `from_date` string, date: date from which you want to fetch data for your connection. Defaults to [consent](#consents-object) `from_date`. The allowed values for this parameter must be within exactly 365 days ago and it should comply to the fetching period restrictions in the [consent](#consents-object).
      - `to_date` string, date: date until which you want to fetch data for your connection. Defaults to `null` (today). The allowed values for this parameter must be equal or more than `from_date` and less or equal than tomorrow. Also it should comply to the fetching period restrictions in the [consent](#consents-object).
      - `fetched_accounts_notify` boolean: whether Salt Edge should send a success callback after fetching accounts.
      - `custom_fields` object: a JSON object, which will be sent back on any of your callbacks.
      - `locale` string: the language of the Connect widget and of the returned error message(s) in the <a href='http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes' target="_blank">ISO 639-1</a> format. Possible values are: `bg`, `cz`, `de`, `en`, `es-MX`, `es`, `fi`, `fr`, `he`, `hr`, `hu`, `it`, `nl`, `pl`, `pt-BR`, `pt`, `ro`, `ru`, `si`, `sk`, `sv`, `tr`, `uk`, `zh-HK`(Traditional), `zh`(Simplified). Defaults to `en`.
      - `include_natures` string[], nullable: the natures of the accounts that need to be fetched. Check [accounts attributes](#accounts-attributes) for possible values. If `null`, all accounts will be fetched.
      - `customer_last_logged_at` string, date-time: the datetime when user was last active in your application
      - `exclude_accounts` string[]: array of [account `ids`](#accounts-list) which will not be fetched. Applied to `reconnect` and `refresh` atempts.
      - `store_credentials` boolean, required: whether the credentials should be stored on Salt Edge side
      - `unduplication_strategy` string: This parameter mandates how duplicated transactions are managed. Possible values include: `mark_as_pending`, `mark_as_duplicate`, `delete_transactions`. The default is set to `mark_as_pending`. The provided value remains unchanged until other value is sent on [connect_session/reconnect](/account_information/v5/#connections-reconnect) or [connect_session/refresh](/account_information/v5/#connections-refresh). - `mark_as_pending` - leaves identified duplicated transactions in `Pending` status for clients that establish connections with providers having a non-null `custom_pendings_period` - `mark_as_duplicate` - identifies transactions as duplicated and sets the `duplicated` flag to `true` - `delete_trasactions` - removes identified duplicated transactions
      - `user_present` boolean: whether the request was initiated by the end-user of your application. It is taken into account only for PSD2-compliant providers and used for `reconnect` and `refresh`.
      - `return_to` string: the URL the user will be redirected to, defaults to client's home URL. If the provider has `api` mode and interactive `true` then this field is `mandatory`.
    - `daily_refresh` boolean: whether the connection should be automatically refreshed by Salt Edge.
    - `return_connection_id` boolean: whether to append `connection_id` to `return_to` URL.
    - `categorization` 'none' | 'personal' | 'business': the type of categorization applied.
    - `include_fake_providers` boolean: if sent as `true`, the customers of [live](/general/v5/#live) clients will be able to connect [fake providers](#providers-fake).

## Response `200`

OK

- OauthConnectResponse
  - `data` object, required
    - `connection_id` string: `id` of the connection
    - `connection_secret` string
    - `attempt_id` string: `id` of the attempt
    - `token` string
    - `expires_at` string, date-time
    - `redirect_url` string

## Other responses

- `400`: The passed `from_date` - `to_date` interval is out of consent `from_date` - `to_date` range
- `404`: We could not find a connection with the requested `connection_id`
- `406`: The accessed provider has the `disabled` status. Hence, is no longer supported

## Changes

> 17 revisions in range; 1 not diffed.

- **2024-06-07** `41121896cc5e`: 1 info
  - added the new optional request property `data/attempt/unduplication_strategy`
- **2022-07-05** `4c8e37d25dfe`: 1 info
  - added the new `accounts_without_balance` enum value to the request property `data/attempt/fetch_scopes/items/`
- **2021-07-29** `9eda9646ec8c`: 9 breaking, 12 info
  - the `request` response's property type changed from `string` to `object` for status `400`
  - the `request` response's property type changed from `string` to `object` for status `404`
  - the `request` response's property type changed from `string` to `object` for status `406`
  - removed the required property `error_class` from the response with the `400` status
  - …17 more

[Operation history](https://skmtc.dev/saltedge/apis/salt-edge-account-information-api/changes/oauth_providers/reconnect/post.md)

---

[API](https://skmtc.dev/saltedge/apis/salt-edge-account-information-api.md) - [All operations](https://skmtc.dev/saltedge/apis/salt-edge-account-information-api/llms.txt) - [OpenAPI document](https://skmtc.dev/saltedge/apis/salt-edge-account-information-api/revisions/acda2850de69?raw)
