Getting Started
Overview
This guide walks you through building your first OAuth2 app with Deel, from initial setup to submitting for App Store review. You’ll learn how to implement OAuth2 authentication, make API calls, and prepare your app for production.
Prerequisites
Before you begin, you’ll need:
Deel Account
- Go to app.deel.com
- Click Sign Up and complete the registration process
Technical Knowledge
Basic understanding of:
- OAuth2 authorization flow
- RESTful API concepts
- HTTPS and web security
- Backend development (Node.js, Python, etc.)
Development Environment
Set up your development environment:
- Code editor or IDE
- Backend framework of your choice
- Testing tools (Postman, curl, etc.)
- ngrok or similar for local testing
Get in touch: We recommend reaching out to our partnership team before you start building. We can provide guidance, answer questions, and help you succeed.
Step 1: Create Your OAuth2 App
Register your application in the Developer Center:
Step 2: Implement OAuth2 Flow
Implement Deel’s OAuth2 authorization code flow to authenticate users and obtain access tokens.
Detailed OAuth2 guide: For a complete explanation of OAuth2 implementation including authorization requests, token exchange, and token refresh, see our OAuth2 documentation.
Quick overview:
- Redirect users to Deel’s authorization endpoint
- User authorizes your app
- Exchange authorization code for access and refresh tokens
- Store tokens securely
- Use access token for API requests
- Refresh tokens automatically when they expire
Step 3: Make API Calls
Use the access token to call Deel APIs:
Step 4: Test in Sandbox
Test your integration using Deel’s sandbox environment:
Switch to Sandbox
Use sandbox endpoints for testing:
- Auth:
https://app-sandbox.letsdeel.com/oauth/authorize - Token:
https://app-sandbox.letsdeel.com/oauth/token - API:
https://api-sandbox.letsdeel.com/rest/v2/
Ready to publish? Once you’ve built and tested your app, check out the Publishing to App Store guide to learn how to submit your app for review.
Best Practices
Security
- Store tokens encrypted at rest
- Use HTTPS for all communications
- Never expose client secrets
- Implement proper token refresh logic
- Validate redirect URIs
Error Handling
- Handle 401 errors with token refresh
- Implement exponential backoff for retries
- Provide helpful error messages to users
- Log errors for debugging
- Test all error scenarios
Performance
- Cache API responses when appropriate
- Respect rate limits
- Use pagination for large datasets
- Monitor API response times
- Optimize database queries
User Experience
- Clear OAuth authorization screen
- Loading states for API calls
- Graceful degradation on errors
- Easy disconnection/reconnection flow
- Comprehensive documentation
Common Pitfalls
Avoid these common mistakes:
- Not implementing token refresh (tokens expire!)
- Hardcoding credentials in code
- Ignoring rate limits
- Not handling OAuth errors properly
- Storing tokens in plain text
- Using synchronous API calls that block