Skip to main content
To register for client access to our single sign-on service, contact your account manager or visit our website.

Authorisation URL

This is where you’ll send your users to begin the authorisation process. This is not an API endpoint.
The URL is made up of several parts. The path tells us which consumer group you want to verify, and the query parameters identify you to us, so we know where to send users back to at the end. It is always in this form:
For detail on which values you can use for “consumer supergroup” in the path, see the section below on Consumer Supergroups.

Query parameters

Success

Successfully authenticated and verified users who authorise your application will be redirected to your app in their browser, at the redirect URI you provide to us. If you have registered more than one redirect URI, we will use the one you included in the URL above. When a user has authorised your app, we will give you an authorisation grant code in the code query parameter on the redirect URI. A user who chooses not to authorise your app by clicking “Cancel” will be sent back to the redirect URI you provided without the authorisation grant code. This is not an error, and doesn’t have any relation to their verification status. Below are some examples of redirect URIs you might send to us, and where we will send the user as a result.

Errors

These are shown on our service but it may be helpful to know their causes in case users report them to you. They are typically caused by an issue with your implementation, but contact your account manager or support if you continue to have issues.

The redirect uri included is not valid

Redirect URIs must be registered with us and are matched strictly on scheme, authority and path. Check that the redirect_uri parameter you are including is correct.

Client authentication failed due to unknown client, no client authentication included, or unsupported authentication method

Ensure that the client_id parameter you are including is correct.

The authorization server does not support this response type

The response_type parameter must be code.

API Endpoints

These endpoints are accessed at https://accounts.studentbeans.com - note the subdomain, which is different from the authorisation URL above.

POST /oauth/token

Exchange an authorisation grant code for an API access token.
These parameters are all required.

Success

On success, you will receive a JSON object containing an access token, refresh token and metadata.

Error

In the case of an error, we will return an appropriate HTTP status code and a JSON-formatted body detailing the problem.
400 Bad Request
invalid_grant
This occurs when the authorisation grant code (code) you’ve sent us is invalid, has been used already or has expired. If you have different client IDs across several clients, the code may have been generated for a different client ID. Ensure that the redirect URI exactly matches the one you included in the redirect_uri parameter when you linked the user to /oauth/authorize. It must match exactly, including any custom query parameters this time.
invalid_request
This is an OAuth 2 protocol error. Your request did not include the specified query parameter. If you see this error with the code parameter, ensure that users who arrive at your redirect URI without the code parameter are handled correctly - this can happen when they decline to authorise your app.
unsupported_grant_type
This is an OAuth 2 protocol error. Ensure that the grant_type query parameter in your request is present and has the value authorization_code. We do not currently support other grant types.
401 Unauthorized
Your client ID or secret is invalid. Check that the request is formatted correctly, and that the client ID and secret exactly match the ones given to you when you registered.

GET /api/v3/me.json

Get an authorised user’s verification information.
You must include a valid access token with your request.

Success

The user has an active verification in one group.
Response field reference

Error

In case of error, our response will include an appropriate HTTP status code.
400 Bad Request
This response has no body. It occurs when your request to us is malformed. Check that your HTTP client is configured correctly and is sending required HTTP request headers, like Host.
401 Unauthorized
This response may have a body:
It occurs when the access token you provide is missing, malformed or invalid. Ensure that you are setting either the Authorization header or the access_token query parameter, and that the access token is one you got from the /oauth/token API endpoint above. You cannot use the authorisation grant code for this endpoint.
403 Forbidden
This response has no body. This error may occur if your request has no User-Agent header.
404 Not Found
This response may have a body:
This can happen with access tokens granted in the past, where the user they referred to has since asked us to delete their account.

Consumer Supergroups reference

Below is a reference of consumer supergroups and the closed consumer groups they contain, with the string value that will appear in the supergroup key in the API response.