-
Please can anyone point me to how else I can connect to the rest API of antmedia. I am using docker and I have updated the conf/red5.properties file with server.jwtServerControlEnabled=true I have also generated the jwt token and using it as curl -X GET -H "Content-Type: application/json" -H "ProxyAuthorization:eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.e30.tA6sZwz_MvD9Nocf3Xv_DXhJaeTNgfsHPlg3RHEoZRk" "https://example.com:5443/rest/v2/system-resources" I have restarted too but I still get forbidden. What else do I do? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
First go through this again. Make sure that secret key is 32 characters.
Also, curl --location 'http://localhost:5080/rest/v2/users/authenticate' After success you can use the cookie to make a call to "https://example.com:5443/rest/v2/system-resources" take a look at this: |
Beta Was this translation helpful? Give feedback.
-
What I did was, after setting it up inside red5.properties, i now came to untick jwt for IP and enabled jwt for Rest and then entered the secret key inside the settings page for the application on my web panel, now it works... thank you. |
Beta Was this translation helpful? Give feedback.
First go through this again.
https://antmedia.io/docs/guides/developer-sdk-and-api/rest-api-guide/management-rest-apis/#jwt-token-authentication
Make sure that secret key is 32 characters.
Be sure you generate JWT as stated in documentation screen shot.
curl -X GET -H "Content-Type: application/json" -H "ProxyAuthorization:eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.e30.tA6sZwz_MvD9Nocf3Xv_DXhJaeTNgfsHPlg3RHEoZRk" "https://example.com:5443/rest/v2/system-resources"
Also,
Can you try to authenticate with username password?
curl --location 'http://localhost:5080/rest/v2/users/authenticate'
--header 'Content-Type: application/json'
--data '{ "email": "username", "password": "your-md5-webpanel-pa…