Skip to Content
ReferenceConfiguration options

Configuration options

Options passed to RollbarPluginFactory({ ... }):

OptionTypeDescription
ACCESS_TOKENstringSingle token used when SERVER_ACCESS_TOKEN / CLIENT_ACCESS_TOKEN are not set
SERVER_ACCESS_TOKENstringToken for Node (Next.js server, API routes). Use Rollbar “post_server_item”
CLIENT_ACCESS_TOKENstringToken for browser. Use Rollbar “post_client_item”
configRollbarConfigBase Rollbar config (environment, captureUncaught, reportLevel, etc.)
serverConfigRollbarConfigMerged over config when running on server
clientConfigRollbarConfigMerged over config when running in browser
rollbarInstanceRollbarPre-initialized Rollbar instance; skips token/config init
DEBUGbooleanWhen true, log publish calls to console

At least one of ACCESS_TOKEN, SERVER_ACCESS_TOKEN, CLIENT_ACCESS_TOKEN, or rollbarInstance must be provided. The plugin picks the token for the current runtime (server vs browser) and initializes the Rollbar SDK once.

Last updated on