To retreive an API token you need to login into your account, then you can go to the API section in your account.
Over here you can create a new API token, and give it three types of permissions:
The PasteCloud API uses
Bearer as authentication header.
Here an example of the authentication:
$ curl https://pastecloud.net/api/pastes/recent -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6IjU2NDdiNjhsdfqqsdfsdqfsgggf' -H 'Accept: application/json' -H 'Content-Type: application/json'