How to change in the configuration of OAI-PMH service to allow requests from any user agent?


What application are you using?
OJS 3.3.0-4
Dear All,

I am experiencing a problem with indexing our journal in AGRIS FAO database.

I have submitted OAI url ( to AGRIS for automatic harvesting of content into their system.

They have responded that my OAI settings are not properly configured. They explained the following issue:

“After our IT team reviewed the harvesting process through your OAI-PMH endpoint, the results of the analysis indicate the following:
The harvesting process only seems to respond when the request comes from a browser. When we attempt to harvest using our Python script, the request gets rejected with an error 406. However, it seems to go through when we configure the User-Agent in the script to impersonate a browser.
This is why we would like to recommend you a change in the configuration of your OAI-PMH service to allow requests from any user agent.”

Now, I don’t know how to adjust OAI settings to allow for any user agent.

Could anyone please help me in this regards?

Your assistance is greatly appreciated.


Python based OAI-PMH harvesters usually use pyoai or python-requests as user agent string.

It might be that your provider has blocked such user agents or the IP address in their Apache bad bot lists, so you have to check with him.