Tài liệu API V1, phiên bản cũ. Bản đang dùng là V3.

API lấy Acess-Token

Access-Token là mã truy cập do được khởi tạo từ Auth Code, để có thể truy cập dữ liệu của bạn trên hệ thống của Casso.

Get access token

POST https://oauth.casso.vn/v1/token

Endpoint này dùng để lấy access token.

Request Body

Name Type Description
code string API Key

200

{
    "refresh_token": "Refresh token",
    "access_token": "Access token",
    "expires_in": "Số giây access token hết hạn, mặc định là 21600 = 6 tiếng"
}

401

{
    "error": 401,
    "message": "Unauthorized Access",
    "data": null
}
curl --location --request POST 'http://oauth.casso.vn/v1/token' \
--header 'Content-Type: application/json' \
--data-raw '{
    "code": "API Key"
}'