Authorization

How to get access to Woodpecker API 2.0

Weronika Wróblewska avatar
Written by Weronika Wróblewska
Updated over a week ago

IN THIS ARTICLE:


Authorization overview

Authorization is made with API key. You can generate it in your Woodpecker panel. Not sure how? Check this guide.


API Key is a part of an API Key and Integrations add-on, click here to learn how to get it on Marketplace »


Your API key identifies your account so keep it secret!

Remember, API key is a required parameter. We'll return an error if it's missing or invalid.

Another noteworthy thing is that if you use Agency panel, each company you've added can have their own API keys. To access any data from a specific company added to your Agency, you need to generate API key for this company.

How to access Woodpecker API

All API requests starts with

https://api.woodpecker.co/rest/v1 

or

https://api.woodpecker.co/rest/v2. 

Woodpecker API 1.0 documentation is available here.

IMPORTANT: use API key generated in Woodpecker as a password, not user name.

To make request you can place your API key in headers, as following:

     headers : { 
"Authorization" : "Basic <API KEY>"
}

If you prefer to use cURL, you can use the following syntax:

curl --location --request GET 'https://api.woodpecker.co/rest/v2/endpoint_of_your_choice' \ 
--header 'Authorization: Basic <API_KEY>'

Remember to encode your API key to Base64 format before using it in cURL request. Remember to add a colon before the API key before encoding it, so our app will treat it as a password, not username. Otherwise you'll get an invalid API key error. In other words, your API key before encoding should look like this:

:1234.abc5def6ghi7jkl8mno9pqr10stuvwxyz

Accessing Woodpecker API with API platforms

If you're using an API platform such as Postman to access the API, you need to choose Authentication Basic option and provide your API key (not encoded) as a password.

For any API related feedback feel free to drop us a line at [email protected] .


Want to integrate with us?

If you're interested in building a native integration with Woodpecker, fill out this form and we'll get back to you.

Did this answer your question?