Skip to content

How to compute checksum for Scalelite Management Using APIs - No examples or document provided #1158

@rautniraj

Description

@rautniraj

So recently we had requirement to implement the scalelite management api in our greenlight. I have read the api documentation. I didnt find proper example on how to compute checksum. This really took lot of time to figure out. Looking at #1025 i got idea to refer to bbb-api guide

I have tried to compute checksum for endpoint after lot of understanding and trying

  1. Successfully done for GET /scalelite/api/getServers

How i computed -> computed_checksum = SHA256('getServers' + 'LB_SECRET_KEY')

Then i made the api call ->
curl --request GET 'https://example.com/scalelite/api/getServers?checksum=computed_checksum'

And it worked 🥇

  1. I am facing problem in POST /scalelite/api/addServer

How i tried to compute ->

# here param is the raw json with no extra spaces
param = '{"server":{"url":"https://server1.com/bigbluebutton/api","secret":"example-secret"}}'

computed_checksum = SHA256 ('addServer' + param + 'LB_SECRET_KEY')

my api call ->
curl --header "Content-Type: application/json" --request POST --data '{"server": {"url": "https://server1.com/bigbluebutton/api", "secret":"example-secret" } }' 'https://example.com/scalelite/api/addServer?checksum=computed_checksum' -v

Error i received :

<?xml version="1.0"?>
<response>
  <returncode>FAILED</returncode>
  <messageKey>checksumError</messageKey>
  <message>You did not pass the checksum security check</message>
</response>

I have latest version ie v1.6.5 deployed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions