How to set up access tokens
Before you start
ReviewPR needs two tokens to work: a platform token (GitHub or GitLab) to read PR/MR diffs and post inline comments, and an AI provider key (Anthropic, OpenAI, or Mistral) to run the analysis. Both are stored only in your browser โ they are never sent to any server other than the respective API directly.
๐Read PR/MR diffs
๐ฌPost inline comments
๐Stored in browser only
๐คAI key stays local
GitHub Personal Access Token
Required to read PR diffs and post review comments
Option A โ Classic PAT (easier)
1
Go to GitHub.com โ click your profile photo (top-right) โ Settings
2
Scroll to the bottom of the left sidebar โ Developer settings
3
Choose Personal access tokens โ Tokens (classic)
4
Click Generate new token โ Generate new token (classic)
5
Set a descriptive note (e.g.
ReviewPR) and choose an expiration that suits you.6
Select the following scope:
repoFull control of private repositories (includes reading diffs and writing PR comments)
For public repos only, you can use public_repo instead โ it is a narrower scope.
7
Click Generate token โ copy the token immediately (it won't be shown again). It starts with
ghp_.Tip: If you only need ReviewPR to work on specific repositories, use a Fine-grained PAT (Option B) to limit the scope further.
Option B โ Fine-grained PAT (more secure)
1
Go to GitHub.com โ Settings โ Developer settings โ Personal access tokens โ Fine-grained tokens
2
Click Generate new token and set a name + expiration.
3
Under Repository access, choose Only select repositories and pick the repos you want ReviewPR to access, or choose All repositories.
4
Under Permissions โ Repository permissions, set:
Pull requests
Read and writeRead diff, post review comments
Contents
Read-onlyRead file diffs
Metadata
Read-onlyAutomatically included, cannot be removed
5
Click Generate token โ copy it. Starts with
github_pat_.Important: You must have Write role on the target repository (not just Read). If you only have Read access, posting comments will return a
403 Forbidden error even with the correct token scopes.Bitbucket App Password
Used as Basic auth โ provide as
username:app-passwordCreating an App Password
1
Go to Bitbucket.org โ click your avatar (bottom-left) โ Personal settings
2
In the left sidebar click App passwords
3
Click Create app password โ give it a label (e.g.
ReviewPR).4
Select the following permissions:
Repositories
ReadRead PR diffs and file contents
Pull requests
ReadRead PR metadata and existing comments
Pull requests
WritePost inline review comments
5
Click Create โ copy the generated password immediately (shown only once).
6
In ReviewPR enter the token as:
your-username:the-app-passwordExample:
johndoe:ATBB12345abcdeImportant: The token field must be in
username:app-password format. ReviewPR encodes it as HTTP Basic auth automatically โ do not base64-encode it yourself.Workspace & repo: For the Owner field enter your Bitbucket workspace slug (e.g.
mycompany), and for Repository enter the repo slug (e.g. my-project). Both are found in the URL: bitbucket.org/{workspace}/{repo}.GitLab Personal Access Token
Required to read MR diffs and post inline discussions
Creating the token
1
Go to GitLab.com (or your self-hosted instance) โ click your profile photo (top-left) โ Preferences
2
In the left sidebar click Access Tokens
3
Click Add new token โ give it a name (e.g.
ReviewPR) and set an expiry.4
Select the following scopes:
apiFull access โ read MR diffs, post inline comments, and post review discussions
If you prefer minimal scopes, use read_repository + write_repository โ but the api scope is simplest and sufficient for all ReviewPR operations.
5
Click Create personal access token โ copy the token immediately. It starts with
glpat-.Important: Your GitLab account must have at least Developer role on the project. Reporter role cannot post MR comments. Owner/Maintainer roles are required to post comments on locked MRs.
Self-hosted GitLab? Everything above applies. Enter your instance URL in the owner/repo field as
namespace/project-slug. ReviewPR sends API requests to https://gitlab.com by default โ if you're on a self-hosted instance you'll need to update the backend GITLAB_URL env variable.AI Provider API Keys
Anthropic (Claude)claude-opus-4-8
Get key at: console.anthropic.com โ API Keys
Token format:
sk-ant-api03-ยทRecommended โ uses extended thinking for deeper analysisOpenAI (GPT-5.4)gpt-5.4
Get key at: platform.openai.com โ API keys
Token format:
sk-proj-ยทGood balance of speed and qualityMistral (Large)mistral-large-latest
Get key at: console.mistral.ai โ API Keys
Token format:
xxxx...xxxxยทFast and cost-effectivexAI (Grok)grok-3
Get key at: console.x.ai โ API Keys
Token format:
xai-ยทGrok-3 with strong reasoning capabilitiesGoogle (Gemini)gemini-2.5-flash
Get key at: aistudio.google.com โ Get API key
Token format:
AIzaSy...ยทFast and generous free tier availablePre-flight checklist
Platform token has correct scopes (repo for GitHub / api for GitLab)
Token owner has Write / Developer+ role on the target repository
AI API key is active and has remaining credits
PR/MR number is correct and the PR is open (not merged/closed)
Owner / workspace and repository fields match exactly (case-sensitive for GitHub/Bitbucket)
For Bitbucket: token is entered as username:app-password (not base64-encoded)
