Saltar al contenido principal
Servicio de soporte de 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 de metadatos de WorldCat
  • OCLC APIs
Resolution

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

Ejemplo

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