# OAI endpoint always returns 401

**URL:** <https://community.crossref.org/t/oai-endpoint-always-returns-401/3964>\
**Category:** Interfaces for Machines\
**Tags:** oai-pmh, bug, metadata-retrieval\
**Created:** [25 August 2023 11:11 UTC](https://community.crossref.org/t/oai-endpoint-always-returns-401/3964 "2023-08-25T11:11:08Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![abeechin](https://avatars.discourse-cdn.com/v4/letter/a/ce73a5/32.png) [@abeechin](https://community.crossref.org/u/abeechin)\
**Post date:** [25 August 2023 11:11 UTC](https://community.crossref.org/t/oai-endpoint-always-returns-401/3964/1 "2023-08-25T11:11:08Z")

</div>

Hi folks,

I noticed that all requests to the OAI endpoint at `https://oai.crossref.org/OAIHandler` are currently returning a 401 unauthorised status - even for the examples given in the Crossref documentation here:

```auto
https://www.crossref.org/documentation/retrieve-metadata/oai-pmh/

```

e.g.

```auto
https://oai.crossref.org/oai?verb=ListRecords&metadataPrefix=cr_unixsd&set=J:10.1234:98765&from=2017-07-06&until=2017-07-06

```

Is this a known issue or a recent change?

Many thanks!

---

<div class="post-metadata">

**Author:** ![ifarley](https://sea2.discourse-cdn.com/flex020/user_avatar/community.crossref.org/ifarley/32/44_2.png) [@ifarley](https://community.crossref.org/u/ifarley)\
**Post date:** [25 August 2023 12:55 UTC](https://community.crossref.org/t/oai-endpoint-always-returns-401/3964/2 "2023-08-25T12:55:42Z")

</div>

Hi @abeechin ,

Thanks for reporting this issue, and welcome to the Community Forum.

Our technical team is investigating. This looks like it could be related to some work we performed earlier this week.

More as we have it,  
Isaac

---

<div class="post-metadata">

**Author:** ![ifarley](https://sea2.discourse-cdn.com/flex020/user_avatar/community.crossref.org/ifarley/32/44_2.png) [@ifarley](https://community.crossref.org/u/ifarley)\
**Post date:** [25 August 2023 13:16 UTC](https://community.crossref.org/t/oai-endpoint-always-returns-401/3964/3 "2023-08-25T13:16:44Z")

</div>

Hi @abeechin ,

Are you a Metadata Plus subscriber? As you’ll see in the documentation at the link you provided: Metadata Plus subscribers: access to OAI verbs _GetRecord_ and _ListRecords_ require a subscription to our [Metadata Plus](https://www.crossref.org/documentation/metadata-plus/) service. Users of this service are provided with tokens to identify them. Only Metadata Plus subscribers with an active token would have access to the query as you have posted it.

-Isaac

---

<div class="post-metadata">

**Author:** ![abeechin](https://avatars.discourse-cdn.com/v4/letter/a/ce73a5/32.png) [@abeechin](https://community.crossref.org/u/abeechin)\
**Post date:** [25 August 2023 13:21 UTC](https://community.crossref.org/t/oai-endpoint-always-returns-401/3964/4 "2023-08-25T13:21:09Z")

</div>

Ah ok - we are not Metadata plus subscribers and were not aware of this restriction. The error code (seemingly correct) only started appearing two days ago.

We will disable our script and continue to make requests through the public REST API.

---

<div class="post-metadata">

**Author:** ![abeechin](https://avatars.discourse-cdn.com/v4/letter/a/ce73a5/32.png) [@abeechin](https://community.crossref.org/u/abeechin)\
**Post date:** [25 August 2023 13:23 UTC](https://community.crossref.org/t/oai-endpoint-always-returns-401/3964/5 "2023-08-25T13:23:26Z")

</div>

And thank you for looking into it for us 🙂

---

<div class="post-metadata">

**Author:** ![abeechin](https://avatars.discourse-cdn.com/v4/letter/a/ce73a5/32.png) [@abeechin](https://community.crossref.org/u/abeechin)\
**Post date:** [25 August 2023 13:32 UTC](https://community.crossref.org/t/oai-endpoint-always-returns-401/3964/6 "2023-08-25T13:32:16Z")

</div>

Hello again - I just double checked our calls and we are using the _ListIdentifiers_ verb, which is also returning 401, but should be public?

```auto
https://oai.crossref.org/oai?verb=ListIdentifiers&metadataPrefix=cr_unixsd&from=2022-08-11

```

---

<div class="post-metadata">

**Author:** ![ifarley](https://sea2.discourse-cdn.com/flex020/user_avatar/community.crossref.org/ifarley/32/44_2.png) [@ifarley](https://community.crossref.org/u/ifarley)\
**Post date:** [25 August 2023 14:18 UTC](https://community.crossref.org/t/oai-endpoint-always-returns-401/3964/7 "2023-08-25T14:18:50Z")

</div>

Yes, you should have access to the _ListIdentifiers_ verb.

- Public metadata users: we allow public access to two OAI verbs, _ListSets_ and _ListIdentifiers_, which allow for discovery of available information.

Our technical team is investigating. We’ll provide updates on our status page, as we have them: [Crossref Status - Access issues for OAI-PMH, Deposit Harvester, and some Cited-by users](https://status.crossref.org/incidents/j7bpm3dg8ndg)

---

<div class="post-metadata">

**Author:** ![ifarley](https://sea2.discourse-cdn.com/flex020/user_avatar/community.crossref.org/ifarley/32/44_2.png) [@ifarley](https://community.crossref.org/u/ifarley)\
**Post date:** [25 August 2023 17:56 UTC](https://community.crossref.org/t/oai-endpoint-always-returns-401/3964/8 "2023-08-25T17:56:21Z")

</div>

We have a fix in place @abeechin , but have decided not to deploy it late on a Friday ahead of a holiday in the UK. We’ll be deploying a fix on Tuesday between 1400 and 1600 UTC. Thanks again for flagging this to us!

---

<div class="post-metadata">

**Author:** ![abeechin](https://avatars.discourse-cdn.com/v4/letter/a/ce73a5/32.png) [@abeechin](https://community.crossref.org/u/abeechin)\
**Post date:** [30 August 2023 09:21 UTC](https://community.crossref.org/t/oai-endpoint-always-returns-401/3964/9 "2023-08-30T09:21:41Z")

</div>

Many thanks, looks like the fix is in place now 🙌

---

<div class="post-metadata">

**Author:** ![ifarley](https://sea2.discourse-cdn.com/flex020/user_avatar/community.crossref.org/ifarley/32/44_2.png) [@ifarley](https://community.crossref.org/u/ifarley)\
**Post date:** [30 August 2023 15:34 UTC](https://community.crossref.org/t/oai-endpoint-always-returns-401/3964/10 "2023-08-30T15:34:30Z")

</div>

Yay! Indeed. All of our testing looks good, but do let me know if you encounter any other problems.

Thanks again,  
Isaac
