Making your first API call

Sending your API Secret Key

The first step is to get your API Secret Key. To do so, head to the My Account page. You can access it using the top-left menu in the dashboard.
Your API Secret Key should be passed as an HTTP header named Authorization and be prefixed with Bearer.
1
Authorization: Bearer YOUR_API_SECRET_KEY
Copied!

Making a test API call

To test that you can successfully connect to the API, try making the following request:
1
GET https://api.pdfmonkey.io/api/v1/current_user
2
Authorization: Bearer YOUR_API_SECRET_KEY
Copied!
Using the curl command the request would look like this:
1
curl "https://api.pdfmonkey.io/api/v1/current_user" \
2
-H "Authorization: Bearer YOUR_API_SECRET_KEY"
Copied!
You should obtain a response similar to this one:
1
{
2
"current_user": {
3
"id": "12345678-90ab-cdef-1234-567890abcdef",
4
"auth_token": "1234567890ABCDEF1234",
5
"available_documents": 300,
6
"created_at": "2022-01-01T12:34:56.123+00:00",
7
"current_plan": "free",
8
"current_plan_interval": "month",
9
"desired_name": "Jane Doe",
10
"email": "[email protected]",
11
"lang": "en",
12
"paying_customer": false,
13
"trial_ends_on": "2022-01-15",
14
"updated_at": "2022-01-01T12:34:56.123+00:00",
15
"block_resources": true,
16
"share_links": false
17
}
18
}
Copied!

Next step

Once you made your first API call, you're ready to take it to the next level and try generating your first Document!