Version: 1.0.0
Redirect service for handling Reddit API OAuth validation
This service runs on Cloudflare Workers and is used to handle the Reddit API OAuth validation process.
Visit Reddit App Preferences to create a new application.
When creating the application, set the following URL as the redirect URI:
https://reddit.7makj.com/redirect
Build an authorization URL using the following format:
https://www.reddit.com/api/v1/authorize?client_id=YOUR_CLIENT_ID&response_type=code&state=RANDOM_STRING&redirect_uri=https://reddit.7makj.com/redirect&duration=permanent&scope=identity read
In your application, use the authorization code to request an access token from the Reddit API:
POST https://www.reddit.com/api/v1/access_token
Request Headers:
Authorization: Basic base64(YOUR_CLIENT_ID:YOUR_CLIENT_SECRET) Content-Type: application/x-www-form-urlencoded
Request Body:
grant_type=authorization_code&code=AUTHORIZATION_CODE&redirect_uri=https://reddit.7makj.com/redirect