> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Generate OAuth window URI

> This endpoint will generate an `oauth_window_uri` for the specified `member`.    Generating a new `oauth_window_uri` is necessary in order to send the end user through the OAuth process again. There are several situations where you might want to do this, like if a previous attempt at OAuth failed because the end user closed the OAuth window before completing the process, or the financial institution has revoked a previous OAuth token, or the token has expired. <br></br><br></br> The `member` in question must be connected to an institution which supports OAuth. If the institution does not support OAuth, a `400 Bad Request` error will be returned with the message `Member cannot use OAuth`.



## OpenAPI

````yaml openapi/nexus/v1.yaml GET /members/{member_guid}/oauth_window_uri
openapi: 3.0.0
info:
  contact:
    name: Nexus API
    url: https://www.mx.com
  version: 1.0.0
  title: Nexus API
  description: >-
    Legacy clients can use Nexus API for all their connectivity needs. If you
    are a new client refer to our Platform API. Review our [Nexus API
    Guides](/nexus) for more information.
servers:
  - url: https://int-data.moneydesktop.com/
  - url: https://data.moneydesktop.com/
security:
  - sessionToken: []
tags:
  - name: accounts
  - name: beats
  - name: budgets
  - name: categories
  - name: extended transaction history
  - name: goals
  - name: holdings
  - name: identity
  - name: insights
  - name: institutions
  - name: jobs
  - name: member credentials
  - name: members
  - name: merchants
  - name: microdeposits
  - name: monthly cash flow profile
  - name: notifications
  - name: scheduled payments
  - name: sessions
  - name: spending plan
  - name: taggings
  - name: tags
  - name: transaction rules
  - name: transactions
  - name: user
  - name: verification
paths:
  /members/{member_guid}/oauth_window_uri:
    get:
      tags:
        - members
      summary: Generate OAuth window URI
      description: >-
        This endpoint will generate an `oauth_window_uri` for the specified
        `member`.    Generating a new `oauth_window_uri` is necessary in order
        to send the end user through the OAuth process again. There are several
        situations where you might want to do this, like if a previous attempt
        at OAuth failed because the end user closed the OAuth window before
        completing the process, or the financial institution has revoked a
        previous OAuth token, or the token has expired. <br></br><br></br> The
        `member` in question must be connected to an institution which supports
        OAuth. If the institution does not support OAuth, a `400 Bad Request`
        error will be returned with the message `Member cannot use OAuth`.
      operationId: generateOAuthWindowUri
      parameters:
        - name: member_guid
          description: The unique identifier for the member. Defined by MX.
          required: true
          in: path
          schema:
            type: string
        - name: client_redirect_url
          description: >-
            A URL that MX will redirect to at the end of OAuth with additional
            query parameters. Only available with `oauth_referral_source` as
            `APP` or `is_mobile_webview` as `true`.
          required: false
          in: query
          schema:
            type: string
        - name: referral_source
          description: >-
            Must be either `BROWSER` or `APP` depending on the implementation.
            Defaults to `BROWSER`.
          required: false
          in: query
          schema:
            type: string
        - name: ui_message_webview_url_scheme
          description: >-
            A scheme for routing the user back to the application state they
            were previously in.
          required: false
          in: query
          schema:
            type: string
        - name: skip_aggregation
          description: >-
            Setting this parameter to `true` will prevent the member from
            automatically aggregating after being redirected from the
            authorization page.
          required: false
          in: query
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/vnd.mx.nexus.v1+json:
              example:
                member:
                  guid: MBR-ad533d14-b4f1-49a4-8093-b0ae9aa8d023
                  oauth_window_uri: >-
                    https://dev-firefly1.moneydesktop.com/oauth/predirect_to/MBR-ad533d14-b4f1-49a4-8093-b0ae9aa8d023/r620svb66l4rqpskl96k2vkqdqZm04cx2qlAtx17rv5zrtz5lh376g2y6ndfq43ncpnkjl9qlghhxt2ltbxqm6zjhg4h3xnkn26zkn6dp2q2s0k0A21bcb2b6A2fgr2xwf06qg4tzw31pc5jtmAm4tb2612ply6mAqxA60fz1x3d7dmmcw3lcldh7btz9wkywyvkAggbAnbpwrrl3fhtbzhkpzxypy4qm7w51A8kA3dmzcb728kmbr19m9kdxrd8x32qAdwfw5s57wj7r2gwybq46d6rd1nmw084cndp7s3zA1vbmdh814p2zb7g52zxspt9cdpxrswnff9k0qdmkq4nb5k8k6sj92136y31?referral_source=BROWSER&ui_message_webview_url_scheme=MX
components:
  securitySchemes:
    sessionToken:
      description: >
        ### MX Session Token 

        - Request an API token using the read API token endpoint in the MX SSO
        API.

        - Exchange an API token for a session token. 
          - A session token is obtained by sending a POST request to /sessions
          - The session token will be used in each request made for the user. It should be passed in an `MD-SESSION-TOKEN` HTTP header as shown below.
          - This session token is valid for 30 minutes from the time it was created. The 30 minute expiration counter is refreshed with each call.
          - If you send a request with an expired session token you'll receive an error code of `4011`.

        ```

        curl -i https://int-data.moneydesktop.com/accounts \

        -H 'MD-SESSION-TOKEN:
        CWforZl1Vn2vC_v6H4rnQRT1DoWpDouJAV-_5TBmiQRAtA8rsOG_BoajTiOSsL0A3bd-bmHXlA-eQzc9ywItKg'
        \

        -H 'Content-Type: application/vnd.mx.nexus.v1+json' \

        -H 'Accept: application/vnd.mx.nexus.v1+json'

        ```


        In documentation code examples, replace `<API_KEY_VALUE>` with the
        session token.
      type: apiKey
      name: MD-SESSION-TOKEN
      in: header

````