> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wearepion.com/llms.txt
> Use this file to discover all available pages before exploring further.

# SBiD Status API

> SBiD Code API is a service that allows partners to check the status of a Student Beans iD.

## **Authentication**

For most use cases we suggest using the client\_credentials grant type to authenticate. When using the client\_credentials grant type you will only be allowed to request the id\_status scope which allows you to check the status of an SBiD Account.

For more information around how to initiate the client credential auth flow please consult the official OAuth2 documentation at [https://tools.ietf.org/html/rfc6749](https://tools.ietf.org/html/rfc6749) In order to get started you will need to obtain an application id and application secret. Please get in touch with [hello@studentbeans.com](mailto:hello@studentbeans.com) . We have a default TTL for our tokens of 2 hours (or 7200 seconds).

## **API Domain**

`https://accounts.studentbeans.com/`

## **Authorise Endpoint**

If you need to get a bearer token please use the below endpoint to request your token `/oauth/authorize`

## **Token Endpoint**

If you have a bearer token or if you are using client\_credentials, please use the below endpoint to get a token `/oauth/token`

## **Status endpoint**

All status requests have to be made to: `/api/v1/id/code/status.json`

<Note>
  **NOTE**

  We currently only support the JSON mime type
</Note>

## **Single SBiD code status**

### **\[GET] Request Parameters**

| **Parameter** | **Type** | **Description**                                        |
| :------------ | :------- | :----------------------------------------------------- |
| access\_token | string   | access token returned from the `/oauth/token` endpoint |
| id\_code      | string   | Student Beans SBiD code of the user                    |

<Note>
  **NOTE**

  HTTP method is GET so these need to be send in the query string
</Note>

### **Response**

```
{
  "id_code": "ABCDEF1",
  "account": true,
  "verified": true
}
```

## **Batch SBiD codes status**

By using the batch method you can process a greater volume of SBiDs without constantly running into your rate limit. The max batch size is currently set at 1000.

### **\[POST] Request Parameters**

| **Parameter** | **Type** | **Description**                                        |
| :------------ | :------- | :----------------------------------------------------- |
| access\_token | string   | access token returned from the `/oauth/token` endpoint |
| id\_codes     | string   | Comma seperated list of Student Beans SBiD codes       |

<Note>
  **NOTE**

  HTTP method is POST so these need to be send in the form data
</Note>

### **Response**

```
[
  { "id_code": "ABCDEF1", "account": true, "verified": true },
  { "id_code": "ABCDEF2", "account": true, "verified": false },
  { "id_code": "ABCDEF3", "account": false, "verified": false }
]
```

## **Example SBiD Codes:**

```
6C0475E (verified)
7E1729C (not verified)
```

## **Quota / Rate limiting**

Rate limits are currently set at 1 request per second however is negotiable on a case by case basis. If you would like to discuss increasing your rate limit please contact [hello@studentbeans.network](mailto:hello@studentbeans.network) with details of your use case.

## **Over limit Response**

Should you go over your agreed rate limit the API will not fulfil your request, but instead return HTTP status code 429 to indicate the over limit state. Should you get the over limit error please retry your request. For more information about the 429 error code please consult [http://tools.ietf.org/html/rfc6585#section-4](http://tools.ietf.org/html/rfc6585#section-4)
