Skip to contents

Zenodo does not answer a bad token with 401: it returns HTTP 500, which is indistinguishable from a genuine server fault and so gets retried with backoff. Left unchecked, a mistyped or wrong-server token therefore costs minutes of retries per folder before failing. One cheap authenticated request up front turns that into an immediate, accurate message.

Usage

.zenodo_check_token(api, token, sandbox = TRUE)

Arguments

api

the Zenodo API base URL

token

the personal access token

sandbox

whether this is the sandbox server (for the message)

Value

TRUE invisibly; stops when the token is not accepted