Skip to Content
author's profile photo Former Member
Former Member

Badge Icons through Gamification API

I'd like to show the badge icons for a player of the gamification system, but I'm facing a few issues:

- when I retrieve the player details, I get a list of badges and IDs for the images, but those are unique per player. Therefore, I cannot compare two badge IDs of two player to know whether they have the same badge or not. The ID of the badge itself would be more helpful instead of the per player ID (both for the badge and the image)

- when I then try to add the image to my public website through the GetPicture API, the image is not shown since it requires authentication. Since my website is public and I don't want to add any credentials in the HTML code, I cannot show the badge icons. The SCN people's bio pages use images that are hosted on amazon aws to deal with this issue, but those urls are not usable for me since they have no reference to the badge ID or anything alike.

- when I query the GetPicture API with a non existent image id, I do get a 404. However, since I would use this URL in an img tag in my html code, it would be better to get some blank or dummy image returned, not a 404 error. This way I would not see the browsers default "image not found" replacement, which looks like something broken immediately. A dummy image would be a more graceful fallback.

Can anybody give me some hints on how to deal with this? especially with the required authentication for the GetPicture API?

Thanks a lot!

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Aug 28, 2015 at 01:41 PM

    Hi Volker,

    thanks for the valuable feedback. We will consider your feedback for an API redesign.

    - Include badge ID in details to make badges comparable across players

    - Return a dummy "not available" picture instead of 404, although this could also be implemented by the client easily

    Regarding the authentication, things are a bit more complicated. Since we also use getPicture for Avatar images we cannot make them accessible without authentication/authorization. I fear we cannot change this easily. This would require using a separate "bagde storage". We though of using the HCP document service for this. But even the document service requires authentication, I think.

    What you could do is implementing a small "proxy app" which exposes the pictures without authentication. The proxy app would use the tech endpoint for retrieving your pictures.

    Doing so, only your badges would be public and not all pictures.



    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.