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.
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.
Here’s an example using curl
to authenticate a request to the Sendcloud API:
1curl --location 'https://panel.sendcloud.sc/api/v2/parcels' \
2--header 'Accept: application/json' \
3--header 'Authorization: Basic <based-64-encoded-token>'
In the example above, the Authorization
header value is constructed by combining the API keys (base64-encoded) separated by a colon (:
)
Below is an example with the Python requests library. In this case, the base64 encoding is handled automatically, you just pass you public and private key.