A single endpoint to manage authentication for Google Workspace and Microsoft Graph APIs. Generate tokens manually or route them directly to your app via webhooks.
Follow these exact steps to connect your backend application with Open Auth Bridge via webhooks.
Create a JSON object containing three required keys:
u: Your internal User ID (e.g., "user_890")r: Your server's Webhook URL where tokens will be deliveredp: The provider name (google or microsoft){
"u": "user_890",
"r": "https://api.yourdomain.com/v1/save-tokens",
"p": "microsoft"
}
Convert the JSON object to a string, Base64 encode it, and pass it via the state parameter:
GET https://oauth.arshman.me/start-auth/onedrive?state=BASE64_ENCODED_STATE
Once the user grants permission, Auth Bridge will POST the following payload to your webhook:
POST https://api.yourdomain.com/v1/save-tokens
Content-Type: application/json
{
"status": "success",
"provider": "microsoft",
"user_id": "user_890",
"email": "user@outlook.com",
"credentials": {
"access_token": "eyJ0eXAiOiJKV1...",
"refresh_token": "M.R3_BAY...",
"expires_at": 1704100000.5
}
}
Note: Your endpoint must return a 200 OK status immediately upon receiving this request.
When the access token expires, send a POST request from your backend to renew it:
POST https://oauth.arshman.me/refresh
Content-Type: application/json
{
"refresh_token": "M.R3_BAY...",
"provider": "microsoft"
}