Skip to content

Unable to access Rest API even after following all rules #6639

Answered by lastpeony
lexy10 asked this question in Q&A
Discussion options

You must be logged in to vote

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…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by lexy10
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants