Follow these steps to get OAuth working:
- Go to https://www.notion.so/my-integrations
- Click "New integration"
- Important: Select "Public" integration type
- Name it (e.g., "Daily Photo")
- Copy the OAuth client ID and OAuth client secret
# Install Vercel CLI if needed
npm install -g vercel
# Deploy
vercel
# Set environment variables
vercel env add NOTION_CLIENT_ID
# Paste your client ID
vercel env add NOTION_CLIENT_SECRET
# Paste your client secret
vercel env add NOTION_REDIRECT_URI
# Paste: https://YOUR-PROJECT.vercel.app/api/notion-callback
# Redeploy with environment variables
vercel --prodYour backend URL will be: https://YOUR-PROJECT.vercel.app
- Back in Notion integration settings
- Under "Redirect URIs", add:
https://YOUR-PROJECT.vercel.app/api/notion-callback - Save
Create .env file:
EXPO_PUBLIC_NOTION_CLIENT_ID=your_client_id_here
EXPO_PUBLIC_BACKEND_URL=https://YOUR-PROJECT.vercel.appnpm start- App will show login screen
- Tap "Connect to Notion"
- Browser opens to Notion OAuth
- Authorize the app
- You'll be redirected back to the app
- Take a photo and upload!
Answer: https://YOUR-PROJECT.vercel.app/api/notion-callback
Replace YOUR-PROJECT with your actual Vercel project name.
- Can't find .env values: Make sure you created
.envin the project root - Backend errors: Check
vercel logsand verify environment variables in Vercel dashboard - Deep link not working: Rebuild the app after adding the scheme to app.json
- OAuth redirect fails: Double-check the redirect URI matches exactly in Notion settings