Accessing Wise APIs

Wise REST APIs uses the Basic auth to authorise and authenticate calls. It provides secure access to protect resources thereby reducing the hassle of asking for a username and password/OTP every-time a user logs in.

These properties are required in every API call.

  1. basic auth Your user ID & 32-character alphanumeric key string that gives you access to use the API. You would need to provide these in the Headers under the Authorization key in basic auth scheme, i.e. Basic <base64 of "<user_id>:<key>">

  2. institute_id A UUID generated for your institute. This will be provided to you in the email with you API Key

  3. arguments These depend on the API method (POST or GET). These are JSON-encoded values sent along with the API would be something that is mentioned along with the request in the section below.

  4. user-agent This key is found in the headers for each API call that you make. Please ensure that it set to the one provided in the email to you. It should look like → VendorIntegrations/excelr

  5. x-wise-namespace This key should be used in the headers for each API call that you make. Please ensure that it set to the one provided to you. It should look like → excelr

With that in mind, the next step is to send a POST or GET request to api.wiseapp.live with the appropriate values set.

A good first API call would be to get classes in your institute. You would need to specify the API Key in the Header section. You can use Postman to send this API call

Request:
GET /institutes/{ YOUR INSTITUTE ID }/classes

Headers
	'user-agent: VendorIntegrations/excelr' \\
	'content-type: application/json' \\
	'x-api-key: Your API Key' \\
	'authorization: Basic <base64 of "<user_id>:<key>">

Response:
{
  status: 200
  data: {
      classes: [
      {
        pendingRequest, joinedRequest, subject,
        name, classNumber, thumbnail,
        coTeachers: {name, profilePicture}
      },
      ...
      ]
    pendingClasses: [
      {subject, name, classNumber, thumbnail},
      ...
    ]
  }
}

You can send API calls directly in your web browser, using cURL from a command line, or with your programming language of choice.

Last updated