Get Started with the Infra Developer Portal
Follow these three steps to set up your account, create your app, and call Infra's APIs.
01
Step 1: Sign In or Create an Account
To sign in or create your account, follow these steps:
- Click Sign In in the top navigation bar.
Screenshot: the Sign In link and the sign-in page
- Infra staff sign in with their Microsoft Entra ID account.
- New developer? Click Create an Account and enter your name, organization and email address. Infra approves new accounts, and you receive an email when your account is active.
Screenshot: the registration form
02
Step 2: Create an App
To create an app and get its API key, follow these steps:
- Open Apps from your account menu in the top-right corner.
- Click Add app to start creating a new application.
Screenshot: the Apps page and the Add app button
- Enter a clear app name and description.
- Select the API products your app needs.
- Click Save. Products that need Infra's approval show as pending until they are approved.
Screenshot: the new app with its products
03
Step 3: Call the APIs
To call Infra's APIs, follow these steps:
- Open Apps from your account menu and select your app.
- Copy the app's API key (the Consumer Key) from the credentials section. Keep it secret: it identifies your app on every call.
Screenshot: the app's credentials
- Send the key in the
X-API-Keyheader of every request:curl --location --request GET 'https://api.infra.gov.sa/v1/projects/status' \ --header 'Accept: application/json' \ --header 'X-API-Key: [YOUR_API_KEY]'
- Where the API's documentation says so, also send a Microsoft Entra ID access token for your application in the
Authorizationheader:curl --location --request GET 'https://api.infra.gov.sa/v1/projects/status' \ --header 'Accept: application/json' \ --header 'X-API-Key: [YOUR_API_KEY]' \ --header 'Authorization: Bearer [ENTRA_ID_ACCESS_TOKEN]'
- Try your calls first from the API's documentation page in Our Services, before you use them in your application.
The host name and the sample path above are examples; each API's documentation page gives its own address.