The new Unlock Query API is now live, provides better integrations.

We have now developed a small, very lightweight API that allows our partners to query if an article can be unlocked (by purchase).

This is used by media monitoring companies that would like to add the Glimta Unlock button in their reports.
In order to know if it is possible to purchase an unlock link for a certain URL, the new Unlock Query interface is used.

Basically, the URL of the article is sent to the API which returns HTTP200 OK if it is possible to purchase an unlock of the article, or HTTP404 if it is not possible.

You can test it at http(s)://glimta.com/uq?url=xxx
NOTE: We will move to a secured, non-open query in the near future. (Only open to our partners.)

Basic code sample:

curl -i http://glimta.com/uq?url=https://www.di.se/live/amf-inte-nojda-med-swedbanks-utredning-hade-forvantat-oss-mer/

It is also possible to POST a series of URLs at the same time, in order to speed up processing of reports etc.

You post an array of URL strings (in JSON encoding). As a result, you will get a corresponding array of True/False for each URL.

Basic code sample:

curl --header "application/json" --request POST --data '["https://www.di.se/live/amf-inte-nojda-med-swedbanks-utredning-hade-forvantat-oss-mer/"]' https://glimta.com/uq

response:
[true]

 

Kudos: Johan Olofsson, Glimta