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

# Get access token

> Given a `client_id` and `client_secret`, this will return an `access_token` which can be used in the Authorization header of subsequent requests to the Merchant API.

The token provided will last for 3600 seconds (1 hour) and will need to be refreshed after this time.



## OpenAPI

````yaml /openapi/auth_api.oas.json post /api/oauth/token
openapi: 3.0.0
info:
  title: Auth API
  description: Obtain a JWT to use with the Mention Me APIs.
  termsOfService: https://mention-me.com/help/tnc_f/site
  contact:
    name: Mention Me
    url: https://mention-me.com
    email: support@mention-me.com
  version: v2
servers:
  - url: https://mention-me.com
    description: Production
  - url: https://demo.mention-me.com
    description: Demo
security: []
tags:
  - name: Auth
paths:
  /api/oauth/token:
    post:
      tags:
        - Auth
      summary: Get access token
      description: >-
        Given a `client_id` and `client_secret`, this will return an
        `access_token` which can be used in the Authorization header of
        subsequent requests to the Merchant API.


        The token provided will last for 3600 seconds (1 hour) and will need to
        be refreshed after this time.
      operationId: post_merchant_api_oauth_token
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AuthInput'
      responses:
        '200':
          description: A response containing the `access_token` for you to use.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthOutput'
        4XX:
          description: An error has occurred retrieving an access token.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/RFC7807Problem'
components:
  schemas:
    AuthInput:
      required:
        - client_id
        - client_secret
        - grant_type
      properties:
        client_id:
          type: string
        client_secret:
          type: string
        grant_type:
          type: string
          enum:
            - client_credentials
      type: object
    AuthOutput:
      properties:
        access_token:
          type: string
        expires_in:
          type: string
        token_type:
          type: string
          enum:
            - bearer
      type: object
    RFC7807Problem:
      properties:
        status:
          type: integer
          maximum: 599
          minimum: 200
        type:
          type: string
          example: http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
        title:
          type: string
        detail:
          type: string
      type: object

````