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

# Instagram OAuth Callback Endpoint

> This endpoint processes the callback from Instagram Graph API



## OpenAPI

````yaml post /instagram/oauth/callback
openapi: 3.0.1
info:
  title: ClipVision API
  description: ClipVision AI API
  termsOfService: https://www.clipvision.ai/terms/
  contact:
    email: help@clipvision.ai
  license:
    name: ClipVision License
  version: v1
servers:
  - url: https://backend.clipvision.ai/
security:
  - Basic: []
  - api_key: []
paths:
  /instagram/oauth/callback:
    post:
      tags:
        - instagram
      summary: Instagram OAuth Callback Endpoint
      description: This endpoint processes the callback from Instagram Graph API
      operationId: instagram_oauth_callback
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InstagramOAuthCallbackSerializer'
        required: true
      responses:
        '201':
          description: Access token generated successfully
          content:
            application/json:
              schema:
                title: Access Token Response Object
                type: object
                properties:
                  access_token:
                    title: Instagram Access Token
                    type: object
                    properties:
                      access_token:
                        type: string
                      token_type:
                        type: string
                      expires_in:
                        type: integer
                    description: Instagram Access Token OpenAPI Schema
                  error:
                    type: string
                description: Access Token Response Object OpenAPI Schema
              example:
                access_token:
                  access_token: >-
                    EAAD0bO2TYx4BOxSn62gx9rt3WByAaDMxXlAzrdNedQrCZBofMfThAZBBGaapCtknqibOTwNTRvvXkVHpp4DGnvqbCytUTJiIqQN1FZAAte7RZBVLPVzr4tqU9wGG05F99BplqankGzAQTSBl7C3Hjjr5hnSaaw9kslSTwYmLqhL52cH4ZCyrldEFl4PzGZCFozwOrVmZBiHXZA989IpmCfBvaLSHDDH92azZArpMIQlq5RoTSZAjJvF7sC
                  token_type: Bearer
                  expires_in: 5184000
                error: null
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  request_url:
                    type: array
                    items:
                      type: string
                  redirect_uri:
                    type: array
                    items:
                      type: string
                  state:
                    type: array
                    items:
                      type: string
        '500':
          description: Access token was not generated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  access_token:
                    type: object
                    properties: {}
                  error:
                    type: string
              example:
                access_token: null
                error: Failed to fetch OAuth token
components:
  schemas:
    InstagramOAuthCallbackSerializer:
      required:
        - redirect_uri
        - request_url
        - state
      type: object
      properties:
        request_url:
          title: Request url
          minLength: 1
          type: string
        redirect_uri:
          title: Redirect uri
          minLength: 1
          type: string
        state:
          title: State
          minLength: 1
          type: string
  securitySchemes:
    Basic:
      type: http
      scheme: basic
    api_key:
      type: apiKey
      name: User-JWT
      in: header

````