Mavrck Authentication API

The Authentication API from Mavrck — 15 operation(s) for authentication.

OpenAPI Specification

mavrck-authentication-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Mavrck Authentication API
  version: '1.0'
  description: 'Operations tagged Authentication across 2 of this provider''s published API definitions: mavrck-authentication-api-openapi.yml, mavrck-reporting-api.json. Each path carries the servers of the definition it was published in.'
servers:
- url: http://app.splashscore.com/v1
- url: https://app.splashscore.com/v1
- url: https://api.mavrck.co
tags:
- name: Authentication
paths:
  /api-key/facebook:
    post:
      tags:
      - Authentication
      x-handler: auth/facebook_controller.js
      summary: Pass Facebook access grant information in exchange for a JWT to include in the header of requests.
      parameters:
      - name: ^mdp_.+$
        in: query
        required: false
        description: Pass in data points on sign-up, in the format mdp_{data_point_definition_key}
        schema:
          type: string
      responses:
        '200':
          description: User info
          content:
            application/json:
              schema:
                properties:
                  expiresAt:
                    type: string
                    format: date-time
                  rejection:
                    $ref: '#/components/schemas/MembershipRejection'
                  profile:
                    $ref: '#/components/schemas/Profile'
                  token:
                    type: string
        '400':
          description: Missing/invalid parameter
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - communityId
              properties:
                communityId:
                  type: string
                accessToken:
                  type: string
                code:
                  type: string
                  description: Authorization code from beginning of the OAuth flow.
                redirectUri:
                  type: string
                  description: Redirect URI that facebook should redirect to after authorization. Must match the redirect URI from the first part of the flow.
                referralSourceDomain:
                  type: string
                  description: The domain that the user came from when they logged in for the first time
                referringURL:
                  type: string
                utmSource:
                  type: string
                utmMedium:
                  type: string
                utmTerm:
                  type: string
                utmContent:
                  type: string
                utmCampaign:
                  type: string
                phone:
                  type: string
                abTestVariations:
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                      variation:
                        type: string
                facebookPageIds:
                  type: array
                  items:
                    type: string
                shouldAddPages:
                  type: boolean
        required: true
      security:
      - apiKey: []
    servers:
    - url: http://app.splashscore.com/v1
    - url: https://app.splashscore.com/v1
  /auto-login:
    post:
      tags:
      - Authentication
      x-handler: auth/influencer_auto_login/influencer_auto_login_controller.js
      summary: Pass encrypted user key in exchange for a JWT to include in the header of requests.
      responses:
        '200':
          description: User info
          content:
            application/json:
              schema:
                properties:
                  expiresAt:
                    type: string
                    format: date-time
                  rejection:
                    $ref: '#/components/schemas/MembershipRejection'
                  profile:
                    $ref: '#/components/schemas/Profile'
                  token:
                    type: string
        '400':
          description: Missing/invalid parameter
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Member not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - key
              properties:
                key:
                  type: string
                  description: Encrypted user key
                actionGroupId:
                  type: integer
        required: true
      security:
      - apiKey: []
    servers:
    - url: http://app.splashscore.com/v1
    - url: https://app.splashscore.com/v1
  /connected-account/instagram-business:
    post:
      tags:
      - Authentication
      x-handler: auth/instagram_business_controller.js
      summary: Pass Facebook access grant information in exchange for a JWT to include in the header of requests.
      x-access:
      - influencer
      responses:
        '200':
          description: All Instagram Profiles and Facebook Profiles
          content:
            application/json:
              schema:
                properties:
                  token:
                    type: string
                  instagramProfiles:
                    type: array
                    items:
                      $ref: '#/components/schemas/InstagramConnectionInfo'
                  facebookProfiles:
                    type: array
                    items:
                      $ref: '#/components/schemas/FacebookProfileDeprecated'
        '400':
          description: Missing/invalid parameter
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Session expired.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - communityId
              properties:
                communityId:
                  type: string
                accessToken:
                  type: string
                code:
                  type: string
                  description: Authorization code from beginning of the OAuth flow.
                redirectUri:
                  type: string
                  description: Redirect URI that facebook should redirect to after authorization. Must match the redirect URI from the first part of the flow.
                facebookPageIds:
                  type: array
                  items:
                    type: string
        required: true
      security:
      - apiKey: []
    servers:
    - url: http://app.splashscore.com/v1
    - url: https://app.splashscore.com/v1
  /email-auth/lookup:
    post:
      tags:
      - Authentication
      x-handler: email_auth/email_auth_lookup_controller.js
      summary: Pass an email and check if it needs verification or existing login credentials submitted in order to proceed
      parameters:
      - name: ^mdp_.+$
        in: query
        required: false
        description: Pass in data points on sign-up, in the format mdp_{data_point_definition_key}
        schema:
          type: string
      responses:
        '200':
          description: Email was found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: Status of the next step for the client to perform.
                    enum:
                    - userOwnsEmail
                    - loginCredentialsRequired
                    - emailVerificationRequestInitiated
                    - emailOwnedByAnotherUser
        '400':
          description: Missing or invalid parameter.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Access forbidden.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - communityId
              - email
              properties:
                communityId:
                  type: string
                email:
                  type: string
                actionGroupId:
                  type: integer
                referralSourceDomain:
                  type: string
                  description: The domain that the user came from when they logged in for the first time
                redirectUrl:
                  type: string
                referringURL:
                  type: string
                utmSource:
                  type: string
                utmMedium:
                  type: string
                utmTerm:
                  type: string
                utmContent:
                  type: string
                utmCampaign:
                  type: string
        required: true
      security:
      - apiKey: []
    servers:
    - url: http://app.splashscore.com/v1
    - url: https://app.splashscore.com/v1
  /email-auth/signup:
    post:
      tags:
      - Authentication
      x-handler: email_auth/email_auth_signup_controller.js
      summary: Pass an email verification request key and new password in exchange for a JWT to include in the header of requests.
      responses:
        '200':
          description: User Info.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: Status of the next step for the client to perform.
                    enum:
                    - loginCredentialsExist
                    - authenticationRequired
                    - createLoginCredentialsRequired
                    - usersDoNotMatch
                  authenticationOptions:
                    type: array
                    description: If authentication is required before proceeding present what types of login are acceptable (facebook or/and email)
                    items:
                      type: string
                      enum:
                      - facebook
                      - email
                  profile:
                    $ref: '#/components/schemas/Profile'
                  token:
                    type: string
        '400':
          description: Missing or invalid parameter.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Access forbidden.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - key
              - password
              properties:
                key:
                  type: string
                password:
                  type: string
        required: true
      security:
      - apiKey: []
    servers:
    - url: http://app.splashscore.com/v1
    - url: https://app.splashscore.com/v1
  /email-auth/login:
    post:
      tags:
      - Authentication
      x-handler: email_auth/email_auth_login_controller.js
      summary: Pass an email and password in exchange for a JWT to include in the header of requests.
      parameters:
      - name: ^mdp_.+$
        in: query
        required: false
        description: Pass in data points on sign-up, in the format mdp_{data_point_definition_key}
        schema:
          type: string
      responses:
        '200':
          description: User Info.
          content:
            application/json:
              schema:
                type: object
                properties:
                  profile:
                    $ref: '#/components/schemas/Profile'
                  token:
                    type: string
                  rejection:
                    $ref: '#/components/schemas/MembershipRejection'
        '400':
          description: Missing or invalid parameter.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Access forbidden.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: User not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - communityId
              - email
              - password
              properties:
                communityId:
                  type: string
                email:
                  type: string
                password:
                  type: string
        required: true
      security:
      - apiKey: []
    servers:
    - url: http://app.splashscore.com/v1
    - url: https://app.splashscore.com/v1
  /email-auth/forgot-password:
    post:
      tags:
      - Authentication
      x-handler: email_auth/email_auth_forgot_password_controller.js
      summary: Initiate a forgot password password request
      responses:
        '200':
          description: Forgot password email sent.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmptyObject'
        '400':
          description: Missing or invalid parameter.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Access forbidden.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - communityId
              - email
              properties:
                communityId:
                  type: string
                email:
                  type: string
                actionGroupId:
                  type: integer
        required: true
      security:
      - apiKey: []
    servers:
    - url: http://app.splashscore.com/v1
    - url: https://app.splashscore.com/v1
  /email-auth/reset-password:
    post:
      tags:
      - Authentication
      x-handler: email_auth/email_auth_reset_password_controller.js
      summary: Pass an email reset password request key and new password in exchange for a JWT to include in the header of requests.
      responses:
        '200':
          description: User Info.
          content:
            application/json:
              schema:
                type: object
                properties:
                  profile:
                    $ref: '#/components/schemas/Profile'
                  token:
                    type: string
                  actionGroupId:
                    type: integer
        '400':
          description: Missing or invalid parameter.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Access forbidden.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - key
              - password
              properties:
                key:
                  type: string
                password:
                  type: string
        required: true
      security:
      - apiKey: []
    servers:
    - url: http://app.splashscore.com/v1
    - url: https://app.splashscore.com/v1
  /email-verification-request/validate:
    post:
      tags:
      - Authentication
      x-handler: email_verification_request/email_verification_request_validate_controller.js
      summary: Validate an email verification request.
      responses:
        '200':
          description: Email verification request is valid.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: Status of the next step for the client to perform.
                    enum:
                    - loginCredentialsExist
                    - authenticationRequired
                    - createLoginCredentialsRequired
                    - usersDoNotMatch
                  authenticationOptions:
                    type: array
                    description: If authentication is required before proceeding present what types of login are acceptable (facebook or/and email)
                    items:
                      type: string
                      enum:
                      - facebook
                      - email
                  user:
                    type: object
                    properties:
                      email:
                        type: string
                      fullName:
                        type: string
                  emailVerificationRequest:
                    type: object
                    properties:
                      actionGroupId:
                        type: integer
                      redirectUrl:
                        type: string
        '400':
          description: Missing or invalid parameter.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Access forbidden.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - key
              properties:
                key:
                  type: string
        required: true
      security:
      - apiKey: []
    servers:
    - url: http://app.splashscore.com/v1
    - url: https://app.splashscore.com/v1
  /email-verification-request/create:
    post:
      tags:
      - Authentication
      x-handler: email_verification_request/email_verification_request_controller.js
      x-access:
      - influencer
      summary: Create an Email Verification Request
      responses:
        '200':
          description: request is valid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmptyObject'
        '400':
          description: Missing or invalid parameter.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Session expired.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Access forbidden.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - email
              properties:
                email:
                  type: string
                actionGroupId:
                  type: integer
        required: true
      security:
      - apiKey: []
    servers:
    - url: http://app.splashscore.com/v1
    - url: https://app.splashscore.com/v1
  /login-credentials/update:
    put:
      tags:
      - Authentication
      x-handler: login_credentials/login_credentials_controller.js
      x-access:
      - influencer
      summary: Update existing influencer login credentials.
      responses:
        '200':
          description: User Info.
          content:
            application/json:
              schema:
                type: object
                properties:
                  profile:
                    $ref: '#/components/schemas/Profile'
        '400':
          description: Missing or invalid parameter.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Session expired.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Access forbidden.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - newPassword
              properties:
                oldPassword:
                  type: string
                newPassword:
                  type: string
        required: true
      security:
      - apiKey: []
    servers:
    - url: http://app.splashscore.com/v1
    - url: https://app.splashscore.com/v1
  /v1/api-key/login:
    post:
      operationId: loginAdmin
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BasicAuthPostResponse'
        '400':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidateErrorJSON'
        '403':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
        '404':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
      tags:
      - Authentication
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BasicAuthPostRequest'
        required: true
      security:
      - apiKey: []
    servers:
    - url: http://app.splashscore.com/v1
    - url: https://app.splashscore.com/v1
  /v1/auth/facebook/exchange-code-for-token:
    post:
      operationId: exchangeCodeForToken
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                properties:
                  accessToken:
                    type: string
                  token:
                    type: string
                required:
                - accessToken
                - token
                type: object
        '400':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidateErrorJSON'
        '403':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
        '404':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
      description: 'exchangeCodeForToken


        Exchange a Facebook access code for a token

        Used as part of the connecting a social profile on the Community App

        FE requires a Facebook access token prior to connecting a social profile in order to fetch the available pages from the FB API

        Because of how we are using satellizer on the FE to manage the OAuth flow,

        we are required to return our own token as part of this response

        This endpoint requires the user to be authenticated and returns the existing api key as the token'
      tags:
      - Authentication
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FacebookAccessCodeExchangeRequest'
        required: true
      security:
      - apiKey: []
    servers:
    - url: http://app.splashscore.com/v1
    - url: https://app.splashscore.com/v1
  /v1/api-key/swap-app:
    post:
      operationId: swapCommunity
      responses:
        '200':
          description: Authorization info
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SwapAppPostResponse'
        '400':
          description: Missing or Invalid Parameter
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidateErrorJSON'
        '403':
          description: Access forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
      tags:
      - Authentication
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SwapAppRequestBody'
        required: true
      security:
      - apiKey: []
    servers:
    - url: http://app.splashscore.com/v1
    - url: https://app.splashscore.com/v1
  /v1/reset-password:
    get:
      operationId: getResetKey
      responses:
        '200':
          description: Email Sent to Connected Account
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TSOAEmptyObject'
        '400':
          description: Missing/invalid parameter
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidateErrorJSON'
        '403':
          description: Access forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
        '404':
          description: The resource does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
      tags:
      - Authentication
      parameters:
      - in: query
        name: email
        required: true
        schema:
          type: string
      - in: query
        name: hostname
        required: false
        schema:
          type: string
      security:
      - apiKey: []
    post:
      operationId: resetPassword
      responses:
        '200':
          description: Password Changed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TSOAEmptyObject'
        '400':
          description: Missing/invalid parameter
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidateErrorJSON'
        '403':
          description: Access forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
        '404':
          description: The resource does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
      tags:
      - Authentication
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PostRequestBody'
        required: true
      security:
      - apiKey: []
    servers:
    - url: http://app.splashscore.com/v1
    - url: https://app.splashscore.com/v1
  /oauth/token:
    post:
      description: Generate the OAuth Token to authorize further requests.
      operationId: getToken
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TokenRequestDto'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenResponseDto'
        '400':
          description: Bad request
        '403':
          description: Accessing unauthorized instances
      summary: Generate OAuth Token
      tags:
      - Authentication
      security:
      - JWT: []
    servers:
    - url: https://api.mavrck.co
components:
  schemas:
    Error:
      type: object
      properties:
        type:
          type: string
          description: A key representing the type of error that has occurred.
        error:
          type: string
          description: A static description of the type of error.
        params:
          type: array
          description: For errors invovling parameters, this is an array containing the invalid parameters.
          items:
            type: string
        keys:
          type: array
          items:
            type:
            - string
            - object
        artifactLinks:
          $ref: '#/com

# --- truncated at 32 KB (42 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/mavrck/refs/heads/main/openapi/mavrck-authentication-api-openapi.yml