Authentication
This document provides instructions on how to authenticate with our API using OAuth 2.0.
Setup
To successfully authenticate, you will need the following parameters:
Parameter | Description | Value |
---|---|---|
| The URL to request the access token. |
|
| Client identifier for OAuth. | Provided by Docbyte |
| Client secret for OAuth. | Provided by Docbyte |
| Scope defining access permissions. |
|
Token Retrieval Process
Request
POST <accessTokenUrl>
Content Type
application/x-www-form-urlencoded
Required Parameters
To authenticate, include the following parameters in the request body, formatted as URL-encoded
:
Parameter | Value |
---|---|
|
|
| The client ID provided by Docbyte. |
| The client secret provided by Docbyte. |
|
|
Response
Upon a successful request, the authentication service will respond with a JSON object containing the following information:
{
"access_token": "{access token}",
"expires_in": 300,
"refresh_expires_in": 0,
"token_type": "Bearer"
}
Token Validity
Each generated token is valid for 5 minutes.
Use the Token in Requests
In each API request, ensure the Authorization Header is set to Bearer Token and includes the retrieved access token.
Authorization: Bearer <your_access_token>
Error
If an attempt is made to access the API without authentication, the service will return a 401 Unauthorized status.
{
"message": null,
"code": "NOT_AUTHORIZED"
}
Summary
To authenticate:
Obtain necessary credentials and endpoint from Docbyte.
Send a POST request to the
accessTokenUrl
with the required parameters.Use the returned
access_token
in your API requests for secure access.Re-authenticate every 5 minutes or as needed to maintain valid session access.
By following this setup, you ensure that your API interactions remain secure and within our authorization policies. For further support, please contact the Docbyte team.
Example in Postman


OAuth 2.0 Authentication Flow
