-
Notifications
You must be signed in to change notification settings - Fork 674
Closed
Description
Description
I am trying to use the polar typescript sdk with the sandbox environment. However when initialise the sdk like this
import { env } from '@/env.mjs'
import { Polar } from '@polar-sh/sdk'
export const POLAR_ENV = process.env.NODE_ENV === 'production' ? 'production' : 'sandbox'
export const polar = new Polar({
accessToken: env.POLAR_ACCESS_TOKEN,
server: POLAR_ENV,
})I get the error
Error: API error occurred: Status 401 Content-Type application/json Body
{"error": "invalid_token", "error_description": "The access token provided is expired, revoked, malformed, or invalid for other reasons."}
I created the POLAR_ACCESS_TOKEN in the live dashboard, because I cannot see an option to generate a sandbox access token in the sandbox dashboard.
These are all the available options in my sandbox account settings page. I've tried creating an OAuth Account but that one didn't work either.
Environment:
- Operating System: Windows
- Browser (if applicable): Chrome
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels