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

# APIトークンを発行する

> Access KeyとSecret Keyを使って、有効期間が1時間のAPIトークンを発行します。認証が必要なリクエストでは、Authorizationヘッダーにトークンを指定します。有効期間内は同じトークンを再利用してください。



## OpenAPI

````yaml /ja/api-reference/openapi.yaml post /authenticate
openapi: 3.0.3
info:
  title: Notifly API
  version: 1.0.0
  contact:
    email: contact@notifly.tech
servers:
  - url: https://api.notifly.tech
    description: Notifly APIサーバー
security: []
tags:
  - name: catalog
    x-group: カタログ
paths:
  /authenticate:
    post:
      summary: authenticate
      operationId: authenticate
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - accessKey
                - secretKey
              properties:
                accessKey:
                  type: string
                  description: >-
                    プロジェクトのAccess
                    Keyです。プロジェクトごとに1つ発行されます。Notiflyのプロジェクト設定で確認できます。
                  example: example1234567890abcdef1234567890ab
                secretKey:
                  type: string
                  description: >-
                    プロジェクトのSecret
                    Keyです。プロジェクトごとに1つ発行されます。Notiflyのプロジェクト設定で確認できます。
                  example: EXAMPLEabc9%
      responses:
        '200':
          description: 認証に成功しました。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessResponse'
        '400':
          description: リクエストが不正であるか、認証に失敗した場合などのクライアントエラーです。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientErrorResponse'
        '500':
          description: サーバー内部エラーです。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    SuccessResponse:
      type: object
      properties:
        data:
          type: string
          description: 認証トークンです。有効期間は1時間です。
          example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.example
        error:
          type: string
          nullable: true
          description: 成功時はnullです。
          example: null
    ClientErrorResponse:
      type: object
      properties:
        data:
          type: string
          nullable: true
          description: エラー時はnullです。
          example: null
        error:
          type: string
          description: エラーメッセージ
          example: Invalid Authorization Token
    ErrorResponse:
      type: object
      properties:
        data:
          type: string
          nullable: true
          description: エラー時はnullです。
          example: null
        error:
          type: string
          description: エラーメッセージ
        projectId:
          type: string
          nullable: true
          description: プロジェクトIDです。500エラーの場合のみ含まれます。
          example: null
        durationMs:
          type: integer
          nullable: true
          description: 処理時間です。単位はmsで、500エラーの場合のみ含まれます。
          example: null

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.