Roles
The Third-Party Application: “Client”
The client is the application that is attempting to get access to the user’s account. It needs to get permission from the user before it can do so.The API: “Resource Server”
The resource server is the API server used to access the user’s information.The user: “Resource Owner”
The resource owner is the person who is giving access to some portion of their account.Creating an App
Before you can begin the OAuth process, you must first register a new app with the service. When registering a new app, you usually register basic information such as application name, website, a logo, etc. In addition, you must register a redirect URI to be used for redirecting users to for web server, browser-based, or mobile apps. If you wish to register a new app please get in touch with your account manager or contact hello@studentbeans.com.Minimum Requirements
In order for us to create a new app, we require the following information:- App Name
- Redirect URI
- Terms and Conditions URL
- Privacy Policy URL
Redirect URIs
The service will only redirect users to a registered URI, which helps prevent some attacks. Any HTTP redirect URIs must be protected with TLS security, so the service will only redirect to URIs beginning with “https”. This prevents tokens from being intercepted during the authorization process.Client ID and Secret
After registering your app, you will receive a client ID and a client secret. The client ID is considered public information, and is used to build login URLs, or included in Javascript source code on a page. The client secret must be kept confidential. If a deployed app cannot keep the secret confidential, such as Javascript or native apps, then the secret is not used. ##Authorization The first step of OAuth 2 is to get authorization from the user. For browser-based or mobile apps, this is usually accomplished by displaying an interface provided by the service to the user. OAuth 2 provides several “grant types” for different use cases. We are currently supporting the Authorization Code grant type for apps running on a web server.Web Server Apps
Web server apps are the most common type of application you encounter when dealing with OAuth servers. Web apps are written in a server-side language and run on a server where the source code of the application is not available to the public.Authorization
Create a “Log In” link sending the user to:User Profiles
In order to retrieve the user’s profile information you can now use the token to authenticate with our API. Me endpointGET https://accounts.studentbeans.com/api/v1/me.json?access_token=ACCESS_TOKENThere are 3 scopes applicable to this endpoint which gives access to certain information: sbid_profile gives access to the following information:
- Email Address
- Name
- Date of Birth
- Gender
- Country
- Avatar image
- University
- Verification expiry
- Graduation year
- SBiD Number
Sample Responses
Here are sample responses. These sample responses are both annotated and shortened, to highlight the most useful data and explain what it is. A verified user account. This user account is verified as a student.profile.student_verification.expires_in key will be in the past.