Feature Overview
This guide walks you through logging into the system using the Developer Portal APIs. Whether you're new to programming or APIs, this step-by-step tutorial will help you navigate the process smoothly.
Step 1: Access the Developer Portal
- Open your browser and go to: https://developers.airfobspace.com/login.
- Click Sign Up on the front page.
- Fill out the sign-up form and submit it. Your request will be sent to Moca System for approval.
- Once approved, log in using your new credentials.
Step 2: Access the API Documentation
- After logging into the Developer Portal, navigate to API → Document.
- Here you will find detailed API documentation.
Step 3: Create a Demo Site and Get an API Key
- Go to API → Management.
- Click the + Register button to create a new application.
- Select Demo as the Application Type.
- Enter an Application Name of your choice and click Register.
- A Successful Registration popup will appear. Click Download to get an Excel file containing your email and password.
- Click on your newly created application and select API Management.
- In the Issuing API Key popup, enter a name for your API key and click OK to generate it.
Step 4: Log Into the Demo Portal
- Return to the home menu.
- Click Demo Portal from the left-side menu.
- Log in using the email and password from the Excel file.
- Enter the API Key you just created.
- You are now logged into the system!
Step 5: Optional - Login via Postman (3-Step Process)
Step 1: Login API Call
Endpoint: Login
Request Body (JSON):
{ "username": "your_email", "password": "your_password" }
If successful, you will receive a JWT token. Use this token as the Bearer Token in all following API calls.
Step 2: Get Self Accounts
Endpoint: getSelfAccounts
Authorization: Bearer Token (JWT from Step 1)
This call will return the list of available sites/accounts you can access.
Step 3: Login to an Account
Endpoint: loginAccount()
Use your Bearer Token in this call as well.
Step 6: How to Get the Bearer Token on Windows & Mac Browsers
For Windows - Microsoft Edge or Google Chrome
- Press F12 (or Ctrl + Shift + I) to open Developer Tools, or right-click and select Inspect.
- Click on the Network tab.
- Reload the page to capture network activity.
- Use the search bar to filter API calls, e.g., search for groups or login.
- Click on the desired API request to open its details.
- Go to the Headers tab and scroll to Request Headers.
- Find the line starting with Authorization: Bearer.
- Right-click the token and select Copy value.
For Mac - Google Chrome or Microsoft Edge
- Press Command (⌘) + Option + I or right-click and select Inspect.
- Click on the Network tab.
- Reload the page if needed.
- Filter for API calls using keywords like groups.
- Click on an API request, then go to the Headers section.
- Find Authorization: Bearer and copy the token.
For Safari on Mac
- Enable Developer Tools if not already enabled: Safari → Preferences → Advanced → Check Show Develop menu in menu bar.
- Press Command (⌘) + Option + I or select Develop → Show Web Inspector.
- Click on the Network tab.
- Reload the page.
- Search for API calls like groups.
- Click on a request and go to the Headers tab.
- Find Authorization: Bearer under Request Headers and copy the token.
Step 7: Use User-Related APIs
Once logged in, you can now perform user management actions such as:
- getUsers
- createUser
- updateUser
- suspendUsers
Always include the Bearer Token in the Authorization Header.
Demo Environment vs. Production Environment
The above steps are for the Demo environment. For Production:
- Create sites via the Partner Portal.
- Use APIs as long as you know the site ID, email, and password for production.
Important Notes
- To activate a user, at least one credential type (e.g., RF Card, Mobile, Linkpass) must be enabled.
- User IDs and Account IDs are different. Do not mix them up.
- Keep track of passwords if you are switching between different sites.
- The Bearer Token must be updated and used consistently across all API calls.
- You can use the same Bearer Token in Postman if retrieved from the Site Portal first.