リファレンス

COTOHA APIの各APIの入出力仕様についてご説明します。

アクセストークン取得

COTOHA APIを利用するために必要なアクセストークンを取得するためのAPIです。

リクエスト

HTTPエンドポイント

POST [Access Token Publish URL]

リクエストヘッダ

キー名 説明

Content-Type

application/json

リクエストボディ

キー名 データ型 必須/任意 説明

grantType

string

必須

認証方式。以下を指定する。

client_credentials

clientId

string

必須

クライアントID。アカウントページで表示されるclient idを指定する。

clientSecret

string

必須

クライアントシークレット。アカウントページで表示されるclient secretを指定する。

リクエストサンプル(cURL)

{
  "grantType": "client_credentials",
  "clientId": "[client id]",
  "clientSecret": "[client secret]"
}

レスポンス

レスポンス

キー名 データ型 説明

access_token

string

アクセストークン

token_type

string

bearer

expires_in

string

残り有効期限(秒)

scope

string

""

issued_at

string

トークン発行日時(エポックタイムからの経過ミリ秒数)

レスポンスサンプル

{
  "access_token": "[access_token]",
  "token_type": "bearer",
  "expires_in": "86399" ,
  "scope": "" ,
  "issued_at": "1545040132138"
}