CloudFetch
For Developers

Authentication

Integrate CloudFetch OAuth 2.0 to authenticate users in your application.

How It Works

CloudFetch uses OAuth 2.0 Authorization Code flow. Users authorize your app, and you receive a token to make API calls on their behalf.

1. User clicks "Sign in with CloudFetch"
2. Redirect to: https://cloudfetch.app/oauth/authorize
3. User approves permissions
4. CloudFetch redirects to your callback URL with code
5. Exchange code for access_token
6. Use token to call CloudFetch APIs

Getting Your Credentials

  1. 1Go to Developer Console → Applications
  2. 2Create a new application or select existing
  3. 3Copy your Client ID and Client Secret
  4. 4Add your Redirect URIs

Authorization Request

Redirect users to the authorization endpoint:

GET https://cloudfetch.app/oauth/authorize
  ?client_id=YOUR_CLIENT_ID
  &redirect_uri=YOUR_CALLBACK_URL
  &response_type=code
  &scope=identity:read

Token Exchange

After user approval, exchange the code for an access token:

POST https://cloudfetch.app/api/oauth/token
Content-Type: application/json

{
  "grant_type": "authorization_code",
  "client_id": "YOUR_CLIENT_ID",
  "client_secret": "YOUR_CLIENT_SECRET",
  "code": "AUTHORIZATION_CODE",
  "redirect_uri": "YOUR_CALLBACK_URL"
}

API Keys

For server-to-server communication, use API keys instead of OAuth:

  • Test Key: For development, prefixed with test_
  • Live Key: For production, prefixed with live_