Passa al contenuto principale
Supporto OCLC

What is the troubleshooting for an unauthorized API search?

Symptom
  • First we do a token request which is successful.
  • But the subsequent search for metadata returns “Unauthorized”.
Applies to
  • API dei metadati di WorldCat
  • OCLC APIs
Resolution

This can happen when the call to the API doesn’t include an authorization header.

Esempio

An unauthorized call has no authorization header:
 -H "Bearer tk_IdQcD8F8fgKoxC3HbZYXRCgsuoXpNOTAKEY0eBc"
 
An authorized call adds an authorization header like so:
 -H "Authorization: Bearer tk_IdQcD8F8fgKoxC3HbZYXRCgsuoXpNOTAKEY0eBc"

 

Page ID
54279