-
Notifications
You must be signed in to change notification settings - Fork 84
Badgekit User API
In the BadgeKit app, the settings section allows you to manage user accounts for issuing personnel. BadgeKit users may also be added and removed (or have their permissions modified) via API calls. Note that these calls are not to BadgeKit API, but to BadgeKit itself.
The endpoints are:
- POST /api/user
- DELETE /api/user
Requests should be sent as application/json
.
HTTP/1.1
Content-Type: application/json
{
"auth": (encoded JWT, see below),
"email": "edogg@example.org",
"context": { "system": "SystemSlug", "issuer": "IssuerSlug", "program": "ProgramSlug" },
"permissions": { "canDraft": true, "canPublish": false, "canReview": true }
}
Notes:
-
issuer
andprogram
withincontext
are optional (these are admin levels you can use in BadgeKit) - If a permission type is omitted, it defaults to false
-
permissions
is not required (and has no effect if included) for DELETE requests.
The auth parameter of the request should be encoded as a JWT token using the BadgeKit User API's secret (note that this is NOT the same as BadgeKit API's secrets). Supported algorithms are HS256, HS384, HS512 and RS256. The decoded JWT should be structured as follows:
{
"prn": {
"email": "edogg@example.org",
"context": { "system": "SystemSlug", "issuer": "IssuerSlug", "program": "ProgramSlug" },
"permissions": { "canDraft": true, "canPublish": false, "canReview": true }
},
"method": "POST",
"exp": 1400819380,
"typ": "JWT"
}
If you're using a self-hosted instance of BadgeKit, you can configure your User API secret during installation. If you're using the Mozilla-hosted version of BadgeKit and want to access the User API, get in touch and we'll give you the information you need!
For support working with BadgeKit or Open Badges, use any of the following channels:
- Post general questions in our Community Google Group and post technical questions in our Dev Google Group.
- Reach members of the Open Badges team directly on IRC (irc.mozilla.org) on the #badges channel.
- Email questions directly to badges@mozillafoundation.org and a member of the team will follow-up.
- Follow or tweet the Open Badges team @OpenBadges.
- Get involved or submit issues via the GitHub repos - feedback is always appreciated!
Introduction
Users
Developers
- Self-Hosting Guide
- Troubleshooting BadgeKit
- API Introduction
- User API
- BadgeKit and Open Badges Resources
Concepts
Design
History