openapi: 3.1.0
info:
  title: 'Admin Authentication: Current Customer'
  version: 1.0.0
paths:
  /customer/current.jwt:
    get:
      operationId: getCurrentCustomer
      summary: Get Current Customer
      description: |-
        Identify signed-in customers securely by requesting and decoding a BigCommerce-generated JWT.

        The response body will contain a JWT.

        > #### Note
        > The Send a Test Request feature is not currently supported for this endpoint.
      tags:
        - currentCustomers
      parameters:
        - name: app_client_id
          in: query
          description: >-
            This is the client ID of an app-level API account you generate when you create an app in the Developer
            Portal.
          required: true
          schema:
            type: string
        - name: Accept
          in: header
          description: >-
            The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response
            body.
          required: true
          schema:
            type: string
            default: application/json
      responses:
        '200':
          description: >-
            A JWT to decode using the client secret that corresponds with the app client ID you sent as a query
            parameter. 


            After you decode the JWT, the payload resembles the following:


            ```json
              {
                "customer": {
                  "id": 4927,
                  "email": "john.doe@gmail.com",
                  "group_id": "6",
                },
                "iss": "bc/apps",
                "sub": "abc123",
                "iat": 1480831863,
                "exp": 1480832763,
                "version": 1,
                "aud": "6sv16tfx3j5gsopm42ss5dd67g2srvq",
                "application_id": "6sv16tasdgr2b5hs5dd67g2srvq",
                "store_hash": "abc123",
                "operation": "current_customer"
              }
            ```
          content:
            application/json:
              schema:
                type: string
                format: jwt
servers:
  - url: https://your_store.example.com
    description: https://{store_domain}
