Scopes SDK
SDK for managing authorization scopes and access control.
Managing a Scope for User
Learn how to create OAuth/API scopes programmatically using the AuthSec SDK.
- Python
- TypeScript
Step 1: Install SDK Dependencies
pip install requests PyJWT
Step 2: Initialize Admin Helper & Create Scope
from admin_helper import AdminHelper
# Initialize with token
admin = AdminHelper(
token="your-admin-token",
base_url="https://dev.api.authsec.dev"
)
# Create a scope
scope = admin.create_scope(
name="api.documents.write",
resources=["document"]
)
Returns:
Scope object with details of the created scope.
Endpoint:
POST /uflow/user/scopes
Coming Soon