Quickstart Tutorial
Let's integrate Studid in less than 8 minutes.
1. Create a verification for a user
Start the authentication flow by using the Create Verification API Endpoint.
The curl example below shows how you can create a verification.
- The
secretToken
is your self chosen API key that is later needed to access the verification data. - The
redirectUrl
is the URL your user is redirected to after he finished the Studid authentication process. We will pass theverificationId
of the user's verification with theredirectUrl
. In the below example, this would behttps://example.com/redirect?verificationId=123456
. - The
serviceName
property will be displayed to your user on the Studid authentication pages.
curl -L -X POST 'https://api.studid.io/v0.1/verification/create' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"secretToken": "super-secret-token",
"redirectUrl": "https://example.com/redirect",
"serviceName": "Example Service"
}'
Our API Documentation provides a more detailed documentation for our REST-API.
There, you can also find the OpenAPI documentation and more examples for the Create Verification API Endpoint.
2. Save verification reference and redirect user
On success, the create verification endpoint will return a JSON Response with an id
and link
property.
id
is the identifier of your created verification. You have to store the id
with a reference to your user.
Redirect the user to the provided link
.
3. User authentication with Studid and is redirected back to your site
After the user finished the Studid authentication process, he will be redirected to the redirectUrl
you provided in step 1.
We will add query string to your provided redirectUrl
with the verificationId
parameter. An example would be https://example.com/redirect?verificationId=123456
.
Verify that the verificationId
matches the verification you created for this specific user.
4. Get the verification data
Get the data of the verification by calling the Get Verification API Endpoint.
Provide the verification id
for the user and the secretToken
from step 1 as query strings to the Get Verification API Endpoint
curl -L -X GET 'https://api.studid.io/v0.1/verification?id=123456&secretToken=super-secret-token' \
-H 'Accept: application/json'
If the user authenticated with an institution/institutions, the endpoint will respond with session data for the institution/institutions. Else, the sessions
element will be an empty array. For the detailed schema, look at response schema of the Get Verification Endpoint.