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

# Retrieve access token

> Retrieve an access token, per OAuth 2.0 spec



## OpenAPI

````yaml https://dev.hurdlr.com/rest/v1/devUtils/documentation?version=5&Authorization=dexfeE6aRK3zwXP4ku5aWm8w&env=sandbox post /v5/auth/token
openapi: 3.0.1
info:
  title: Tight API
  contact:
    name: Hurdlr, Inc. (dba Tight)
    url: https://www.tight.com
    email: api@tight.com
  version: 6.0.0
servers:
  - url: https://sandbox.hurdlr.com/rest
    description: Staging Environment
  - url: https://prod.hurdlr.com/rest
    description: Production Environment
security:
  - accessTokenSecurity: []
  - basicSecurity: []
tags:
  - name: Authentication
  - name: Banks
  - name: Business & Client Management
  - name: Invoicing
  - name: Revenue
  - name: Investments
  - name: Payouts
  - name: Bills
  - name: Expenses
  - name: Payroll
  - name: Reports
  - name: Accounting
  - name: Mileage
  - name: Taxes
  - name: Time Tracking
  - name: Imports
  - name: Files
  - name: Accountant
  - name: Audit Trail
  - name: Support
  - name: Tax Engine Express
  - name: Interview Endpoint
  - name: Ledgering
  - name: Configuration
  - name: Templates
paths:
  /v5/auth/token:
    post:
      tags:
        - Authentication
      summary: Retrieve access token
      description: Retrieve an access token, per OAuth 2.0 spec
      operationId: postToken
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              required:
                - client_id
                - client_secret
                - grant_type
              type: object
              properties:
                client_id:
                  type: string
                  description: The client_id of the OAuth 2.0 consumer
                  default: ''
                client_secret:
                  type: string
                  description: The client_id of the OAuth 2.0 consumer
                  default: ''
                grant_type:
                  type: string
                  description: >-
                    The OAuth 2.0 grant_type. For refreshing an access_token,
                    use 'refresh_token'. For exchanging an authorization code,
                    use 'authorization_code'. And for obtaining an access_token
                    with your userId, use 'client_credentials'
                  default: ''
                  enum:
                    - refresh_token
                    - authorization_code
                    - client_credentials
                refresh_token:
                  type: string
                  description: >-
                    The refresh_token of the OAuth 2.0 access_token; required if
                    grant_type is 'refresh_token'
                  default: ''
                code:
                  type: string
                  description: >-
                    The authorization code, obtained by having the user login to
                    the oauth 'authorize' website; required if grant_type is
                    'authorization_code'
                  default: ''
                userId:
                  type: string
                  description: >-
                    Id of the user in your DB; required if grant_type is
                    'client_credentials'
                  default: ''
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OAuth2RetValV2'
components:
  schemas:
    OAuth2RetValV2:
      type: object
      properties:
        access_token:
          type: string
          example: >-
            00f6b2b68eb9459eab681d19aa86c6154e225068f3074d1d9b639316d5380a4c.91d620872c3b438ba33f4baaca124624
        refresh_token:
          type: string
          example: >-
            7369c0ee82194721ac6f633ec16206f348680736e80e4aacb85d4fbce0ee9669.56b43c61141541dc858dd8613959389a
        expires_in:
          type: integer
          format: int32
          example: 7776000
        created_at:
          type: integer
          format: int64
          example: 1599065168
        scope:
          type: string
          example: token
  securitySchemes:
    accessTokenSecurity:
      type: oauth2
      flows:
        implicit:
          authorizationUrl: /auth/account
          scopes:
            write: ''

````