• Docs
  • MCP
  • Pricing
Live demo
Get started
  • Get started in 3 steps
  • Track custom goals
  • Use tracking parameters
  • Filter your data
Installation guides
  • All guides
  • Next.js
  • React, Vite and React Router
  • Vue.js
  • Astro
  • WordPress
  • Shopify
  • Webflow
  • Framer
  • Squarespace
  • Wix
  • Google Tag Manager
  • Lovable, Bolt and v0
Revenue attribution
  • Connect a provider
  • Attribution guide
  • Stripe Checkout API
  • Stripe PaymentIntent API
  • Stripe Payment Links
  • Stripe other methods
  • Polar Checkout API
  • Polar Checkout Links
  • Polar other methods
  • Lemon Squeezy Checkout API
  • Lemon Squeezy Payment Links
  • Lemon Squeezy other methods
  • Paddle Checkout API
  • Paddle Overlay Checkout
  • Paddle other methods
  • Dodo Payments
  • Payment API
Proxy guides
  • Get started
  • Next.js
  • Vercel
  • Netlify
  • Cloudflare
  • Nginx
  • Managed proxy
Advanced features
  • Script configuration
  • GDPR and cookieless tracking
  • User identification
  • Exclude visits
  • Error tracking
  • Session replay
  • Bot traffic tracking
  • Export data
  • Public embed
  • Metrics explained
  • Cross-domain tracking
MCP
  • Get started
  • Tool reference
  • OAuth reference
API reference
  • Get started
  • Authentication and scopes
Account
  • Get account
Websites
  • List websites
  • Get website
Analytics
  • Get metadata
  • Get overview
  • Get time series
  • Get realtime
  • Get realtime map
  • Get goals
Breakdowns
  • Get pages
  • Get referrers
  • Get campaigns
  • Get countries
  • Get regions
  • Get cities
  • Get browsers
  • Get operating systems
  • Get devices
Errors
  • List errors
Bot traffic
  • Get bot traffic summary
  • Get bot traffic pages
  • Report a crawler request
Visitors
  • List visitors
  • Get visitor
Payments
  • Create a payment
  • Delete a payment
Troubleshooting
  • Fix CSP blocking the script
  • No data showing
  • Duplicate payments
Docs menu
Get started
  • Get started in 3 steps
  • Track custom goals
  • Use tracking parameters
  • Filter your data
Installation guides
  • All guides
  • Next.js
  • React, Vite and React Router
  • Vue.js
  • Astro
  • WordPress
  • Shopify
  • Webflow
  • Framer
  • Squarespace
  • Wix
  • Google Tag Manager
  • Lovable, Bolt and v0
Revenue attribution
  • Connect a provider
  • Attribution guide
  • Stripe Checkout API
  • Stripe PaymentIntent API
  • Stripe Payment Links
  • Stripe other methods
  • Polar Checkout API
  • Polar Checkout Links
  • Polar other methods
  • Lemon Squeezy Checkout API
  • Lemon Squeezy Payment Links
  • Lemon Squeezy other methods
  • Paddle Checkout API
  • Paddle Overlay Checkout
  • Paddle other methods
  • Dodo Payments
  • Payment API
Proxy guides
  • Get started
  • Next.js
  • Vercel
  • Netlify
  • Cloudflare
  • Nginx
  • Managed proxy
Advanced features
  • Script configuration
  • GDPR and cookieless tracking
  • User identification
  • Exclude visits
  • Error tracking
  • Session replay
  • Bot traffic tracking
  • Export data
  • Public embed
  • Metrics explained
  • Cross-domain tracking
MCP
  • Get started
  • Tool reference
  • OAuth reference
API reference
  • Get started
  • Authentication and scopes
Account
  • Get account
Websites
  • List websites
  • Get website
Analytics
  • Get metadata
  • Get overview
  • Get time series
  • Get realtime
  • Get realtime map
  • Get goals
Breakdowns
  • Get pages
  • Get referrers
  • Get campaigns
  • Get countries
  • Get regions
  • Get cities
  • Get browsers
  • Get operating systems
  • Get devices
Errors
  • List errors
Bot traffic
  • Get bot traffic summary
  • Get bot traffic pages
  • Report a crawler request
Visitors
  • List visitors
  • Get visitor
Payments
  • Create a payment
  • Delete a payment
Troubleshooting
  • Fix CSP blocking the script
  • No data showing
  • Duplicate payments
Datasense

Cookieless analytics with live visitors, console errors and exports, served from your own domain.

Product

  • Features
  • Error tracking
  • AI crawler tracking
  • Revenue attribution
  • Ad-block proxy
  • Pricing
  • Live demo

Docs

  • Get started
  • Install guides
  • Growth guides
  • Ad-block proxy
  • MCP server
  • REST API

Compare

  • vs Google Analytics
  • vs Plausible
  • vs DataFast
  • vs Fathom
  • All alternatives

Company

  • FAQ
  • Terms
  • Privacy
  • Refunds
  • Cookies
  • DPA
© 2026 DatasenseNo cookies were set on this page.

OAuth reference

How Datasense authorizes OAuth requests, which permissions and data are shared, and how to implement an MCP OAuth client.

Setting up a connection? Start with Get started.

How OAuth requests are authorized

  1. You approve a connection. Sign in, select websites and permissions. Datasense saves that approval for you and the client.
  2. The client receives a token. It identifies that connection. It doesn't contain your session or your website keys.
  3. Every request is checked. The token's expiry, the MCP endpoint it was issued for, that the connection is active, the permission the tool needs, and that you still own the website.

Revoke a connection in API & MCP → Connected apps. Its next request and refresh are rejected.

Permissions

Scope Access
account:read Read your name, email and plan.
websites:read List the selected websites with their names and domains.
settings:read Read website settings: timezone, tracking mode and session replay.
analytics:read Read traffic, sources, goals, revenue, JavaScript errors and bot traffic.
visitors:read Read visitor journeys, with names, emails and traits removed. Also needs analytics:read.
visitors:details Include the names, emails and traits your site sent with identify. Also needs visitors:read.

Visitor tools need analytics:read and visitors:read. Without visitors:details they return pseudonymous visitor IDs and generated names, and leave out names, emails and traits your site sent with identify. Paths and goal names can still contain personal data if your site put it there.

OAuth client implementation

Item Value
Issuer https://usedatasense.com
Authorization server metadata https://usedatasense.com/.well-known/oauth-authorization-server
Protected resource metadata https://usedatasense.com/.well-known/oauth-protected-resource/api/mcp
Authorization endpoint https://usedatasense.com/oauth/authorize
Token endpoint https://usedatasense.com/oauth/token
Client registration https://usedatasense.com/oauth/register
Revocation endpoint https://usedatasense.com/oauth/revoke
MCP resource https://usedatasense.com/api/mcp
Grants Authorization code with PKCE S256; rotating refresh tokens
Access token lifetime 1 hour
Refresh token lifetime Up to 30 days
Connection lifetime 90 days from consent; reconnect afterwards
  • Unauthenticated MCP requests get 401 with WWW-Authenticate: Bearer resource_metadata="…", so clients can discover the authorization server.
  • Use the exact MCP URL as resource. Tokens only work at that endpoint.
  • Token requests are application/x-www-form-urlencoded. Send tokens only in Authorization: Bearer ….
  • The authorization response includes iss and echoes state.
  • Public clients use none with PKCE; confidential clients use client_secret_basic or client_secret_post as well as PKCE. Implicit, password and plain PKCE aren't supported.
  • Client ID metadata documents: an HTTPS client_id URL is fetched (no redirects, no private networks, 64 KB at most) and its redirect_uris used.
  • Dynamic registration: HTTPS, loopback HTTP and app-specific scheme redirect URIs. A loopback redirect may use any port. Registrations expire after a year.
  • Codes, tokens and client secrets are stored as hashes. Codes expire after 2 minutes and work once. Reusing a code or a rotated refresh token revokes the connection.
  • The consent page expires after 10 minutes and is bound to the signed-in account.

Tool permissions

Tool Required scopes
datasense_account_get account:read
datasense_websites_list websites:read
datasense_websites_get settings:read
datasense_analytics_metadata analytics:read
datasense_analytics_overview analytics:read
datasense_analytics_timeseries analytics:read
datasense_analytics_realtime analytics:read
datasense_analytics_realtime_map analytics:read
datasense_analytics_pages analytics:read
datasense_analytics_referrers analytics:read
datasense_analytics_campaigns analytics:read
datasense_analytics_countries analytics:read
datasense_analytics_regions analytics:read
datasense_analytics_cities analytics:read
datasense_analytics_browsers analytics:read
datasense_analytics_operating_systems analytics:read
datasense_analytics_devices analytics:read
datasense_analytics_goals_breakdown analytics:read
datasense_errors_list analytics:read
datasense_bot_traffic_summary analytics:read
datasense_bot_traffic_pages analytics:read
datasense_visitors_search analytics:read + visitors:read
datasense_visitors_get analytics:read + visitors:read
Read this page as markdownllms.txt
PreviousTool referenceNext Get started

On this page

  • How OAuth requests are authorized
  • Permissions
  • OAuth client implementation
  • Tool permissions
Sign in