Enable Zotero integration with in third party website

Hi All,

I am pretty new to Zotero and still learning how this is different from the other reference managers like mendeley and ref works.

Currently i am a developer from one of the well renounced website where we are providing searching capability for journal, articles, patents etc.

Recently we are seeing lots of requests from end customers to have a zotero integration within our site. I started reading some documentation regarding like translators, web apis etc. I would like to know what would be the best approach to enable zotero with in our website.

Already we have provided our support to mendeley via there APIs using oauth2 protocal. Is there any option like that available in Zotero to register our web site as one of the client and interact with the zotero APIs on behalf of the end users(who are zotero users).

This option enables us to align with existing integration techniques with other reference managers like refworks and mendeley . This way, we can do more customization from our website to integrate with these reference manager services.

Also would like to know the pros and cons of this approach(if it is possible) compare to other possible integration options.

I tried adding the chrome plugin into my browser and really liked the idea about how it senses the articles presense with in the webpages like google scholar and amazon. Is it the best approach? do we have any limitation on specific browser supports.

We are supporting wide variety of browsers, we wanted to provide this feature irrespective of what browser the end user is using. This is one of the reason for looking to know about API approach.

Kindly provide me your valuable input. Thanks in advance.


Thanks,
Mohan
  • I tried adding the chrome plugin into my browser and really liked the idea about how it senses the articles presense with in the webpages like google scholar and amazon. Is it the best approach?
    Yes. Zotero doesn't work the same way as other programs (though, admittedly, this puts us at a significant disadvantage in terms of discovery). To "support" Zotero, you just need expose metadata in a standard format, and Zotero users will be able to save data just by clicking the Save to Zotero button in their browsers.

    If that's not possible or not sufficient, a Zotero translator can be created for the site that either scrapes the page or (ideally) retrieves data in a structured format.

    Let us know if you have specific questions from that page.
  • edited November 29, 2018
    Thanks a lot for the response.

    I understood we don't have API specific integration option from web application. The only option is to use the Zotero browser plugin/extension button, kindly correct me if my understanding is wrong.

    I found the interesting issue with my web page, i added the chrome plugin and could not get the zotero browser button to enable after my search was successfully ran.

    Then i did some debugging and below are my findings.

    My website is basically single page application, load event is fired only once and every other clicks or page transformation happens with in the application with out refreshing the page(so no more onload event). My initial page load does not include the search results since it will be loaded via Ajax call as part of search form submit action.

    As per plugin code(which i saw during my debugging), Zotero plugin is initialized only when the page load event is triggered, then plugin scans the document object for collecting article information.

    Obviously it could not find any article information and the zotero button will never be enabled. I tried delaying the initialization process of zotero plugin by putting the break point, finally i got the button enabled and it was able collect the reference data from my page.

    So my question is, is there any custom apis we can call from our websites to re scan the dom after the results loaded. Please provide any reference web sites with these kind of use cases(SPA). You help would be really appreciated.

    You also mentioned about the translator, is there a way to create our own translator and delay the process of plugin activation?

  • You can tell Zotero to re-run detection on the page by firing a 'ZoteroItemUpdated' event.

    https://www.zotero.org/support/dev/exposing_metadata#force_zotero_to_refresh_metadata
  • Thanks a lot for the response. Now i am able to lazy initialize the zotero plugin and it was able to detect my documents from the page.
  • @dstillman & @fcheslack

    I found the following web API documentation which supports the oauth specific authentication to access their resources via my web application.

    Is my understanding correct?
    I can call this oauth service and get my users authenticated and use the authtoken/accesstoken to call/write the documents from my website to zotero.
    This way, it helps me to easily integrate from my web site and provide more control/customization options.

    https://www.zotero.org/support/dev/web_api/start

    Kindly provide your feedback on this one.
  • You can, and that would be appropriate for apps that interact with Zotero, but that's just really not how standard saving in Zotero works and not what Zotero users would expect. An account isn't even required to use Zotero, so if you did it that way you would be cutting off a large proportion of the Zotero userbase.

    Can you explain what sort of control/customization options you're envisioning, and why embedded metadata and/or a translator isn't sufficient?

    If the issue is simply a lack of an in-page button to save to Zotero, we're investigating the possibility of allowing websites to embed buttons that trigger the standard save process, though again, Zotero users are used to just clicking Zotero's toolbar button.
  • @dstillman

    Once again thank you for your quick response.

    "Can you explain what sort of control/customization options you're envisioning, and why embedded metadata and/or a translator isn't sufficient?"

    We have an export feature module that supports various integration points like Refworks, Mendeley, Direct download, export to Google Drive and Drop box in various formats.

    Our users are more used to our export module and we also wanted to promote zotero integration as part of export module, this makes the uniformity across all integration points and helps us to track the usage of how many documents being exported from our application(we have this usage tracking enabled for all other integration points).

    "An account isn't even required to use Zotero, so if you did it that way you would be cutting off a large proportion of the Zotero userbase."

    What you mean by 'Zotero account itself not required' from end customer point of view. Can they have their offline Zotero application to manage the references with out even creating the zotero profile?.

    As you mentioned, most of the zotero customers used with Zotero connector browser plugin. Which means our proposed approach of asking authorization from customer via oauth may not be a recommended or welcomed approach?.

    Kindly clear my doubts, i would like to know these details to present with my product team for changing the direction from APIs to Plugin.

  • What you mean by 'Zotero account itself not required' from end customer point of view. Can they have their offline Zotero application to manage the references with out even creating the zotero profile?.
    Yes, that exactly.
  • edited December 5, 2018
    Which means our proposed approach of asking authorization from customer via oauth may not be a recommended or welcomed approach?
    Right, definitely not. Many users won't have Zotero accounts, and most wouldn't even think to check the export options, since on most sites they're used to just clicking the Save to Zotero button on the article page itself.

    As I say, this puts us at a fairly significant disadvantage in terms of discovery for potential new users, but that's more our problem than yours. Even if we did provide a way for sites to embed buttons that would trigger the connector's local save process, most existing users would still want to save with the toolbar button from the main article page, and the worry is that providing an alternative method would just confuse people. (Technically, you can provide a button to save to Zotero now by just serving RIS or BibTeX with the appropriate Content-Type, which Zotero will intercept, but that only allows limited metadata, (I think) doesn't allow PDF downloads, and isn't something people look for, so it's not something we really recommend.)

    As for tracking, I'm afraid we can't help with that, though depending on how the save process works, you might have a record of an export in a particular format, and whether you track that is up to you. (Many translators that don't use embedded metadata just simulate the site's export process, download a specific format, and sometimes make tweaks to the metadata.)
  • I am building an interactive website that will almost entirely be running on ajax principles, too. Could I suggest that Zotero is coded such that it can also get its data from a specific element with id='Zotero' or perhaps 'bibliography'. This would enable an interactive creation of reference data, which could then be put into ANY element which might be hidden from view if the design needs it to be.

    Could I also suggest that the Zotero application has the ability to create a set of META tags from any web record. This would allow for manual entry into Zotero, which could then be propagated accurately everywhere else.
  • @DouglasMilnes: See Exposing Metadata — all of this is covered there.
Sign In or Register to comment.