Function: fetchProtectedResource()

August 29, 2025 ยท View on GitHub

๐Ÿ’— Help the project

Support from the community to continue maintaining and improving this module is welcome. If you find the module useful, please consider supporting the project by becoming a sponsor.


โ–ธ fetchProtectedResource(config, accessToken, url, method, body?, headers?, options?): Promise<Response>

Performs an arbitrary Protected Resource resource.

Authorization Header is used to transmit the Access Token value. No other Access Token means of transport are supported.

Parameters

ParameterTypeDescription
configConfiguration-
accessTokenstringOAuth 2.0 Access Token
urlURLURL to send the request to
methodstringHTTP Request method to use for the request
body?FetchBodyHTTP Request body to send in the request
headers?HeadersHTTP Request headers to add to the request
options?DPoPOptions-

Returns

Promise<Response>