Docs home

Generate Student API Key

Single sign-on: exchanges a JWT signed by your own system for an Edmingle API key for that learner. If no matching user exists, a learner account is created. Use it to log learners in from your portal, or to act on a learner's behalf, without their Edmingle password.

GET/sso
Generate Student API Key
curl --request GET \
  --url 'https://<your-api-host>/nuSource/api/v1/sso?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJPbmxpbmUgSldUIEJ1aWxkZXIiLCJpYXQiOjE3MDkxMTc5NjksImV4cCI6MTc0MDY1MDU5NCwiYXVkIjoid3d3LmV4YW1wbGUuY29tIiwic3ViIjoianJvY2tldEBleGFtcGxlLmNvbSIsImVtYWlsIjoiaGVtYWxAZWRtaW5nbGUuY29tIiwiZmlyc3RfbmFtZSI6ImhlbWFsYnVoYSIsImxhc3RfbmFtZSI6ImhlbWFsYnVoYSJ9.WuGx8yJmnKDZ-qbicHFWEzl73YqvNxLIcbviNMJX-Ck'
{
  "code": 200,
  "message": "Login successful",
  "user": {
    "username": "Hemal7478413",
    "apikey": "c8a4d5f32520a259f26aad998d23ca62",
    "user_id": 60510,
    "role": 1,
    "contact_number": "7259943259",
    "email": "hemal@edmingle.com",
    "is_sign_up": 0,
    "expires_at": 1711709977075,
    "server_key": "189ac18745185bf43c5d33e142c3e932",
    "is_user_mfa_enabled": 0
  }
}

Access: Public, no API key. The JWT must be signed with your institute's "Edmingle API token" (from the integration settings). Call it on your institute's own API host.

Query parameters
jwtstringrequired
JWT signed with HS256 using your institute's Edmingle API token. Claims below.
1 web (default), 2 Android, 3 iOS, 4 API.
Device fields used by Edmingle's apps.

JWT claims:

Name Required Type Description
iat Yes integer Issued-at Unix time. The token is rejected if more than 2 minutes old.
exp No integer Expiry Unix time.
email If your institute signs up by email string Used to find the learner.
contact_number If your institute signs up by phone string Used to find the learner.
external_uuid No (required for some institutes) string Your ID for the learner. If it matches an existing user, that user is logged in.
name No string Full name, used when creating the account. Falls back to first_name.
first_name, last_name No string Used when creating the account.
Response200application/json
codeinteger
Example: 200
messagestring
Example: Login successful
userobject
Show child attributesHide child attributes
Example: Hemal7478413
Example: c8a4d5f32520a259f26aad998d23ca62
Example: 60510
user.roleinteger
1 learner
Example: 1
Example: 7259943259
Example: hemal@edmingle.com
Example: 0
Unix time in milliseconds; keys from SSO last 30 days, 1 day for some institutes
Example: 1711709977075
Example: 189ac18745185bf43c5d33e142c3e932
Example: 0

Notes: Errors: "Invalid Token, Please Try Again" (bad signature or format), "Token Expired, Please Try Again !" (iat older than 2 minutes or past exp), "Email is required as it is primary field" / "Contact number is required as it is primary field", "external_uuid is required" or "No user found for the given external_uuid" (institutes set to match on external ID only), "Contact Admin For Signup!" (new user but sign-up is disabled), "Multiple users found with same credentials , please contact admin . ". Rate limit: 30 requests per minute; going over locks you out for 30 minutes.

Updated yesterday

Ask AI