-
Notifications
You must be signed in to change notification settings - Fork 249
Description
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
- 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 🥇
- 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