Skip to content
On this page

Authentication

You can get accessToken and related verification information by sending your publicKey and SecretKey . AccessToken will expire after 12 hours. When calling the subsequent interface, you must carry this token in the request header: Authorization: Bearer {accessToken}.

Postman Example:

image-20230522151628960

Get Token:

Request method

  • request method: POST
  • parameter transfer method: Body (JSON)

Request parameter

ParameterData TypeDescriptionRequired
publicKeyStringProject public Key: You can find the public key in the API Keys section of your ComPDFKit API Account.yes
secretKeyStringProject secret Key: You can find the secret key in the API Keys section of your ComPDFKit API Account.yes

Request address

https://api-server.compdf.com/server/v1/oauth/token

Return parameter

ParameterData TypeDescription
accessTokenStringToken
tokenTypeStringToken type
expiresInStringToken validity
scopeStringToken Range
projectNameStringProject Name
java
"code": "200",
"msg": "success",
"data": {
    "accessToken": "<signed_token>",
    "tokenType": "bearer",
    "expiresIn": "41767",
    "scope": "server",
    "projectName": "Test"
}