last updated September 30, 2024
We provide a basic REST API with JSON data. By basic, we mean quite literally as basic as possible. The only action available today is to send a badge offer to a user. API offerings will expand over time, and the documentation will be updated to reflect any changes.
We also provide a no-code option in the form of an embeddable widget, for users to claim badges directly from your site.
We use tokens to manage access. You need a token to send a request. There are 2 ways to manage your tokens
To obtain an initial token, follow the steps below
Response
{ "expiry": "2024-01-01T10:10:10.111222-06:00", "token": "d75a9e55c7badge73t3zct0111dtda0312efd630e81a58b1a051359816d506b4", "user": { "username": "username" } }
To delete a token, follow the steps below
To delete all of your tokens, and presumably flee the country, follow the steps below
As mentioned above, we only offer 1 endpoint - Send a single badge offer to a single user.
What's a badge offer? You might ask. We have some frequently asked questions on that topic here. It's important to note that someone doesn't have to accept your offer, and they can also mark it as spam.
Request
{ "receivingUser": "Username OR email", "badgeUUID": "my-awesome-badge-id", "supportingEvidence": "My Internal ID, or formatted JSON. Pretty much whatever." }
Response (202)
If there's not an error, we'll send you back the same user information and badge ID to confirm that we received the correct information.
{ "receivingUser": "Username OR email", "badgeUUID": "my-awesome-badge-id", "supportingEvidence": "whatever you send us :)" }
Errors
Generally, we will only send back a couple of errors.
Bad access (401)
Make sure your token is active (not expired) and that you have set it correctly in the header.
{ "detail": "Invalid token." }
{ "detail": "Authentication credentials were not provided." }
Badge error (400)
Double-check that you have the correct ID and are the creator of the badge.
{ "detail": "Bad badge data." }
This is only available through the web UI. There is no endpoint to retrieve badge information.
https://www.boastbadge.com/badge/editBadge/this-is-your-awesome-badge-id/
If you prefer not to do custom development (and, honestly, I don't blame you), we offer an embeddable widget for users to claim a badge directly from your site. It's quite literally copy/paste!
This is what the widget code looks like
<iframe width="370" height="150" src="https://www.boastbadge.com/badge/claimBadge/embed/your-awesome-badge-id" frameborder="0" scrolling="no" allowfullscreen title="Claim This Badge"></iframe>
Lame, I know, but you just can't trust people, right?