Set up RemoFirst API authentication for global HR and payroll integration. RemoFirst provides API access for enterprise customers.
1. Contact RemoFirst support for API access
2. Receive API key and base URL
3. Note: Sandbox environment available for testing
# .env
REMOFIRST_API_KEY=your_api_key
REMOFIRST_BASE_URL=https://api.remofirst.com/v1
import os, requests
class RemoFirstClient:
def __init__(self):
self.base_url = os.environ["REMOFIRST_BASE_URL"]
self.headers = {
"Authorization": f"Bearer {os.environ['REMOFIRST_API_KEY']}",
"Content-Type": "application/json",
}
def get(self, path, params=None):
resp = requests.get(f"{self.base_url}{path}", headers=self.headers, params=params)
resp.raise_for_status()
return resp.json()
def post(self, path, data):
resp = requests.post(f"{self.base_url}{path}", headers=self.headers, json=data)
resp.raise_for_status()
return resp.json()
client = RemoFirstClient()
company = client.get("/company")
print(f"Connected! Company: {company['name']}")
print(f"Countries: {len(company.get('active_countries', []))}")
| Error | Cause | Solution |
|---|---|---|
401 Unauthorized |
Invalid API key | Contact RemoFirst support |
403 Forbidden |
API access not enabled | Request API access from account manager |
| Connection refused | Wrong base URL | Verify URL with RemoFirst |
First API call: remofirst-hello-world