Authentication
Every conversion request call must be authenticated with your credentials. ConvertAPI supports Query Parameters
and Bearer Authentication
for stateless authentication.
Authentication keys
You have three options for authenticating your requests, which can be found in your account dashboard:
- API Secret : Authenticates conversion requests, the /user endpoint, and allows for API token creation using REST-API.
- API Key: Authenticates conversion requests, differentiates environments, and sets consumption limits.
Authentication methods
You can pass your preferred authentication key using a Query Parameter
or the Authorization
header:
Method | Persistence | Usage |
---|---|---|
URL Parameters | Stateless | Secret , Token |
Bearer Authentication | Stateless | Secret , Token |
Query authentication
Authenticate your request using the URL authentication ?auth=secret_or_token
query parameter:
curl -X GET https://v2.convertapi.com/convert/docx/to/pdf?auth=secret_or_token
Authorization header
Authenticate your API calls using API Secret or API Token as a Bearer token using the Authorization
header:
curl -X POST https://v2.convertapi.com/convert/docx/to/pdf \
-H "Authorization: Bearer secret_or_token"
-F "File=@/path/to/my_file.docx" \
-F "StoreFile=true"
Authentication Response Codes
- 200 OK
2000
: Token created successfully.2001
: Token deleted successfully.
- 401 Unauthorized
4010
: Invalid user credentials - bad secret.4011
: Invalid user credentials - bad token.4013
: User credentials not set - secret or token must be provided.4014
: User inactive.
Updated 27 days ago