REST API
Documentation
- Nederlands
- English
Authentication
Print API is secured with OAuth 2.0. This means your app must identify itself before it can communicate with the API. This is called authentication. On this page, we'll walk through the authentication process.
TIP: Keep your API keys at hand. These are found on your dashboard.
Example
If you use our C# library, authentication is handled for you. Just copy the following code and replace the CLIENT_ID and SECRET with your API keys.
var credentials = new PrintApi.Credentials
{
ClientId = "CLIENT_ID",
SecretProvider = () => "SECRET"
};
using (var client = new PrintApi.Client(credentials, PrintApi.Client.Mode.Test))
{
// ...
}
SecretProvider
load the secret from an encrypted source on-demand.
That way, it's not permanently stored in memory.
The variable client
now contains an API client that will automatically authenticate if needed.
You can use this API client to call Print API functions. All API calls are async, so here's what
that looks like:
PrintApi.Output.Order order = await client.Orders.GetAsync("863596363");