Authentication

Before you can start making requests towards Sendcloud APIs, you will need to register and obtain your Public and Secret API keys and learn how to authenticate your requests.

Sendcloud Authentication

Sendcloud uses Basic Authentication for authenticating requests for APIs, where username is your Public Key and password your Private Key as provided for your integration.

Do not share your Private API keys in publicly accessible areas such as GitHub, client-side code, and so forth.

Authenticating your requests

Once you have obtained your Public and Private key you will need to start authenticating your requests, in order to so, you need to include your keys in your requests. Below it’s an example of using them with the Python requests library

1import requests
2
3
4public_key = "your_sendcloud_public_key"
5private_key = "your_sendcloud_private_key"
6
7r = requests.get('https://panel.sendcloud.sc/api/v2/parcels', auth=(public_key, private_key))
Go to top