epaper.guru
EN

Home / Developers / Subscription API

Subscription API

The interface of the subscription management, for your own forms, apps and the paywall on your server. The ready-made components use the same API.

There are two parts: the Portal API for the browser and apps, on behalf of a subscriber, and the Server API for your server, with a secret API key.

Portal API

Base: https://api.epaper.guru/v1/abo/SHOP-SCHLÜSSEL/ · callable only from the websites you have enabled in the subscription management · messages in German or French (Accept-Language)

After the login, send the session as Authorization: Bearer st_…. It is valid for 30 days and is extended with each use.

MethodPathWhatSession
GETconfigname, colours and texts of the publisher
POSTlogin{ email, password } → { token, user }
POSTlogoutend the sessionyes
GETmeaccount with subscriptionsyes
PUTmechange detailsyes
PUTme/passwordchange passwordyes
GETaccess/{guid}does the account have this product or group? → { granted, reason }yes
POSTregister/check{ abo_nummer, plz }: does the number belong to a print subscription?
POSTregisterset up online access; the subscriber gets an email to confirm
POSTpassword/forgot{ email }: reset link by email
POSTpassword/resetnew password with the link from the email
curl -X POST https://api.epaper.guru/v1/abo/SHOP-SCHLÜSSEL/login \
  -H 'Content-Type: application/json' \
  -d '{"email":"…","password":"…"}'

Server API

Base: https://api.epaper.guru/v1/server/ · header Authorization: Bearer ak_… · you create the API key in the subscription management under Integration → API keys. It determines the publisher and never belongs in the browser.

MethodPathWhat
GETproductsproducts and groups with GUID
POSTsession{ token: "st_…" } → { user, expires_at }: whom does a website login belong to?
POSTlogin{ email, password } → { user }: check credentials
GETaccess?user=…&product=…does the account (GUID) have the product or group? → { granted, reason }
GETuser?guid=… | email=… | abo_nr=…look up an account
POSTverify-print-abo{ abo_nummer, plz }: check a print subscription
POSTregistercreate an account
PUTuserchange an account
POSTpassword/forgottrigger the reset email

A complete example of a server-side paywall is under Login and paywall.

Moving from the former SOAP interface: every SOAP method has a counterpart here (login, validateProduct → access, get/getByEmail/getByAboNr → user). A guide with a PHP example is in the subscription management under Integration → API documentation.

Errors

StatusMeaning
401not logged in, session expired or wrong API key; in the Server API also wrong credentials
403call from a website that is not enabled
404unknown shop key or account
422input missing or invalid, in the Portal API also wrong credentials: { message, errors: { feld: [ … ] } }
429too many attempts, wait a moment