Repository navigation
|
Hi, I'm trying to use the /auth/room/createRoom endpoint in PlugNmeet and keep getting this response:
Here’s what I’ve done so far: My config.yaml inside the container looks like this: auth: My Client Request: Here's the curl command I'm using from a Linux machine: BODY='{"room_id":"room01"}' SIGNATURE=$(echo -n "$BODY" | openssl dgst -sha256 -mac HMAC -macopt key:"$SECRET" | awk '{print $2}') curl -X POST https://plugnmeet.domain/auth/room/createRoom Is there anything I’m missing in the HMAC setup, or is there another reason the API key would not be recognized? Any help is appreciated! |
Replies: 2 comments 3 replies
|
Where did you find this structure? |
|
I've tested your code with demo server: #!/bin/bash -e
BODY='{"room_id":"room01"}'
API_KEY="plugnmeet"
SECRET="zumyyYWqv7KR2kUqvYdq4z4sXg7XTBD2ljT6"
SIGNATURE=$(echo -n "$BODY" | openssl dgst -sha256 -mac HMAC -macopt key:"$SECRET" | awk '{print $2}')
curl -X POST https://demo.plugnmeet.com/auth/room/getActiveRoomInfo \
-H "Content-Type: application/json" \
-H "API-KEY: $API_KEY" \
-H "HASH-SIGNATURE: $SIGNATURE" \
-d "$BODY"The response was: {"status":false,"msg":"no room found","room":null}And {"status":true,"msg":"success","room":{"room_info":{"room_title":"Demo room","room_id":"room01","sid":"7a3b35b5-177b-48b7-9492-4619fb1feb37","joined_participants":"1","is_running":1,"is_recording":0,"is_active_rtmp":0,"webhook_url":"","is_breakout_room":0,"parent_room_id":"","creation_time":"1753883016","metadata":"{\"room_title\":\"Demo room\",\"welcome_message\":\"Welcome to plugNmeet!<br /> To share microphone click mic icon from bottom left side.\",\"is_recording\":false,\"is_active_rtmp\":false,\"parent_room_id\":\"\",\"is_breakout_room\":false,\"started_at\":\"1753883020\",\"room_features\":{\"allow_webcams\":true,\"mute_on_start\":false,\"allow_screen_share\":true,\"allow_rtmp\":true,\"allow_view_other_webcams\":true,\"allow_view_other_users_list\":true,\"admin_only_webcams\":false,\"allow_polls\":true,\"room_duration\":\"40\",\"enable_analytics\":true,\"allow_virtual_bg\":true,\"allow_raise_hand\":true,\"auto_gen_user_id\":false,\"recording_features\":{\"is_allow\":true,\"is_allow_cloud\":true,\"enable_auto_cloud_recording\":false,\"is_allow_local\":true,\"only_record_admin_webcams\":false},\"chat_features\":{\"allow_chat\":true,\"allow_file_upload\":true,\"allowed_file_types\":[\"jpg\",\"png\",\"zip\"],\"max_file_size\":\"50\"},\"shared_note_pad_features\":{\"allowed_shared_note_pad\":true,\"is_active\":false,\"visible\":false,\"node_id\":\"\",\"host\":\"\",\"note_pad_id\":\"\",\"read_only_pad_id\":\"\"},\"whiteboard_features\":{\"allowed_whiteboard\":true,\"visible\":false,\"whiteboard_file_id\":\"\",\"file_name\":\"\",\"file_path\":\"\",\"total_pages\":0,\"max_allowed_file_size\":\"30\"},\"external_media_player_features\":{\"allowed_external_media_player\":true,\"is_active\":false},\"waiting_room_features\":{\"is_active\":true,\"waiting_room_msg\":\"\"},\"breakout_room_features\":{\"is_allow\":true,\"is_active\":false,\"allowed_number_rooms\":6},\"display_external_link_features\":{\"is_allow\":true,\"is_active\":false},\"ingress_features\":{\"is_allow\":true,\"input_type\":\"RTMP_INPUT\",\"url\":\"\",\"stream_key\":\"\"},\"speech_to_text_translation_features\":{\"is_allow\":true,\"is_allow_translation\":true,\"is_enabled\":false,\"is_enabled_translation\":false,\"max_num_tran_langs_allow_selecting\":2,\"allowed_speech_langs\":[],\"allowed_speech_users\":[],\"allowed_trans_langs\":[]},\"end_to_end_encryption_features\":{\"is_enabled\":false,\"included_chat_messages\":false,\"included_whiteboard\":false,\"enabled_self_insert_encryption_key\":false},\"polls_features\":{\"is_allow\":true,\"is_active\":false}},\"default_lock_settings\":{\"lock_screen_sharing\":true,\"lock_whiteboard\":true,\"lock_shared_notepad\":true},\"copyright_conf\":{\"display\":true,\"text\":\"Powered by <a href=\\\"https://www.plugnmeet.org\\\" target=\\\"_blank\\\">plugNmeet</a>\"},\"metadata_id\":\"02190c11-6265-457b-9d9a-942be3a1fd46\"}"},"participants_info":[{"sid":"PA_a8eXxCWMKfJZ","identity":"1753883011926","state":"ACTIVE","tracks":[],"metadata":"{\"is_admin\":true,\"record_webcam\":true,\"is_presenter\":true,\"raised_hand\":false,\"wait_for_approval\":false,\"lock_settings\":{},\"metadata_id\":\"55219780-4d15-49a6-a575-0bfeed44816e\",\"ex_user_id\":\"1753883011926\"}","joined_at":"1753883020","joined_at_ms":"1753883020463","name":"Jibon ","version":2,"permission":{"can_subscribe":true,"can_publish":true,"can_publish_data":true,"can_publish_sources":[],"hidden":false,"recorder":false,"can_update_metadata":false,"agent":false,"can_subscribe_metrics":false},"region":"","is_publisher":false,"kind":"STANDARD","attributes":{},"disconnect_reason":"UNKNOWN_REASON","kind_details":[]}]}} |
I've tested your code with demo server:
The response was:
{"status":false,"msg":"no room found","room":null}And
{"status":true,"msg":"success","room":{"room_info":{"room_title":"Demo room","room_id":"room01","sid":"7a3b35b5-177b-48b7-9492-4619fb1feb37","joined_participants":"1","is_running":1,"…