Skip to main content

Accessing the API

Sign Up as Facility User

Start by signing up as a Facility User.

Email and Password

  1. Navigate to the signup page using the appropriate link for your environment.
  2. Enter your email address.
  3. Create a password. Ensure your password meets the following criteria:
    • At least 8 characters.
    • Includes at least 3 of the following:
      • lowercase letters (a-z),
      • uppercase letters (A-Z),
      • numbers (0-9)
      • special characters (e.g., !@#$%^&*).

Click the "I Manage a Facility" Button

Once you log in, you will be redirected to a page where you need to click the "I manage a facility" button.

Step 2

Enter Your First and Last Name

  1. Fill in your first name.
  2. Fill in your last name.

Enter Your Phone Number

  1. Enter your phone number in the designated field.

Review and Accept Terms and Conditions

  1. Carefully read through the terms and conditions.
  2. Check the box to acknowledge that you have read and understood them.

Complete the Sign-Up Process

  1. After accepting the terms and conditions, click the "Continue" button.

You will be redirected to the facilities page

Step 6

With this, you have successfully signed up as a Facility User.

Register your application in the Developer Portal

Once you have signed up as a Facility User, you can register your application in the Developer Portal

Register new Application

Application details

Fill in the Application Details

Application details

Authorization Code Flow

Review the authorization code flow to understand how to obtain the token.

Auth Base URL

Since Nursa provides two environments for third-party integrators, make sure to use the correct URL to connect to the Nursa Authorization Server:

Audience URL

Example with Replacements

Replace {clientId}, {scopes}, and {redirectUri} with your actual values:

<!DOCTYPE html>
<html>
<head>
<title>Redirect Button</title>
</head>
<body>
<button onclick="redirectToAuth()">Redirect</button>

<script>
function redirectToAuth() {
const authBaseUrl = "https://auth.sandbox.nursa.com";
const clientId = "yourClientId";
const scopes = "yourScopes";
const redirectUri = "yourRedirectUri";

const authUrl = `https://${authBaseUrl}/oidc/authorize?client_id=${clientId}&scope=${scopes}&redirect_uri=${redirectUri}&audience=https%3A%2F%2Fpublic-api.sandbox.nursa.com%2F&response_type=code&response_mode=query`;

window.location.href = authUrl;
}
</script>
</body>
</html>

Steps to Follow

  1. When the user clicks the "Redirect" button, they will be redirected to the authorization server’s login page.
  2. The user logs in and grants the requested permissions.
  3. After granting permissions, the authorization server redirects the user to the specified redirect_uri with an authorization code.
  4. The client application then exchanges the authorization code for an access token by making a request to the token endpoint.