Developers

Integrating your media site with Glimta is quite easy.

For the Glimta Unlock marketplace, there are two basic ways of integration, depending on if your newspaper site is using a client side or a server side paywall:

  • The Glimta Proxy
  • The Glimta WordPress plugin.
  • Paywall integration (Preferred).

The Glimta Proxy

The Glimta proxy is a ”quick-and-dirty” way to rapidly offer Glimta Unlock.
It works, as the name implies, as a proxy, removing the paywall code from the html.

The result is a Glimta link that fetches the web page.

Pros: 

  • Quick to get up and running.

Cons:

  • Only works with some sites… Most sites do not work, at least not without manual adjustments from our programmers.
  • Does not work with websites using backend paywall technologies.
  • May result in different layout, fonts etc.
  • May cause some scripts to stop working

The proxy setting is enabled under Sites-Developer in the Glimta Publisher Portal.
Screenshot 2018-10-12 09.03.24.png

Please contact us before attempting to go live using the Proxy.

Paywall integration

Glimta relies on the standard OAuth2 authentication flow to authenticate and authorize users so being somewhat familiar with the topic is very helpful.

You as a publishing site developer typically takes the following actions:

  • Register Your app using the Glimta Publisher Portal to retrieve your ClientID and ClientSecret
  • Implement the necessary OAuth2 callback endpoint.
    Note! This endpoint could be called ”unprovoked”, i.e. without Your site having performed the initial authorize-request first.
  • Decide how to store visitors access tokens within your site. This could for example be done by creating local users and assign an access token property to them or by storing in secured cookies.
  • Use the users access token in a call to https://glimta.com/api/v1/me/access to register a visit. You get back a status wether the user is allowed access to the content or not
  • The returned data also contains a tracking script to be included on the page to track users read time

 

More recources: