SDKs
Official client libraries for the Pcampus Platform.
| Language | Status | Package |
|---|---|---|
| JavaScript / TypeScript | Coming soon | @pcampus-studio/sdk |
| Python | Planned | — |
| Go | Planned | — |
| Flutter / Dart | Planned | pcampus_sdk (pub.dev) |
| Rust | Planned | pcampus-sdk (crates.io) |
The JavaScript SDK is in development (G-047). Until it ships, use the REST APIs directly — they are stable and well-documented. Flutter and Rust libraries will follow after the JS SDK ships.
Using the REST API directly
All Pcampus APIs are plain HTTP with JSON. Any HTTP client works:
# cURL
curl https://pip.pcampus.co/identity/me \
-H "Authorization: Bearer $PIP_API_KEY"// JavaScript — fetch (Node 18+ / browser)
const res = await fetch('https://pip.pcampus.co/identity/me', {
headers: { Authorization: `Bearer ${process.env.PIP_API_KEY}` },
})# Python — httpx
import httpx
r = httpx.get('https://pip.pcampus.co/identity/me',
headers={'Authorization': f"Bearer {api_key}"})// Flutter / Dart — http package
import 'package:http/http.dart' as http;
final response = await http.get(
Uri.parse('https://pip.pcampus.co/identity/me'),
headers: {'Authorization': 'Bearer $pipApiKey'},
);// Rust — reqwest
use reqwest::header::{AUTHORIZATION, HeaderMap, HeaderValue};
let mut headers = HeaderMap::new();
headers.insert(
AUTHORIZATION,
HeaderValue::from_str(&format!("Bearer {}", pip_api_key))?,
);
let client = reqwest::Client::new();
let res = client
.get("https://pip.pcampus.co/identity/me")
.headers(headers)
.send()
.await?;Flutter integration notes
Flutter apps using Firebase Auth can use the Connect widget via External IdP binding — see Connect — External IdP:
import 'package:firebase_auth/firebase_auth.dart';
// Get Firebase ID token
final token = await FirebaseAuth.instance.currentUser?.getIdToken();
// Send to Connect identity exchange
final res = await http.post(
Uri.parse('https://connect-api.pcampus.co/v1/identity/exchange'),
headers: {
'Content-Type': 'application/json',
'x-tenant-id': 'your-tenant-id',
},
body: jsonEncode({
'provider': 'firebase',
'identityToken': token,
}),
);Get notified
To be notified when SDKs ship, watch the pcampus-developers (opens in a new tab) repository or email support@pcampus.co.