plutoless / eEducation

e-education solutions(Agora Reference Design)
184 stars 124 forks source link

Internal Server Error | Code 500 #175

Closed projovi closed 4 years ago

projovi commented 4 years ago

I have been trying to use the API, but keep landing on ERROR 500 What am I missing ????

https://api.agora.io/edu/v1/apps/MYAPPID/room/entry?appId=MYAPPID&roomName=12365214231546985&roomUuid=12365214231546985&userName=demouser&userUuid=300000000&role=2&type=2

srs888001 commented 4 years ago

maybe you can refer to https://github.com/AgoraIO-Usecase/eEducation/issues/138

projovi commented 4 years ago

@srs888001 Thanks, But it's not the token error.

I have already Included Authorization in the header .

Content-Type : application/json

Authorization : Basic MmJkMzk3Y2Q1ZGYwNGM0MDkwMmI0ZmM0NTMwODU1NmE6ZGZh***

https://api.agora.io/edu/v1/apps/MYAPPID/room/entry?appId=MYAPPID&roomName=12365214231546985&roomUuid=12365214231546985&userName=demouser&userUuid=300000000&role=2&type=2

---Run In POSTMAN -- { "msg": "Internal Server Error", "code": 500 }

srs888001 commented 4 years ago

The API is a post request:https://api.agora.io/edu/v1/apps/MYAPPID/room/entry, you can check it again.

projovi commented 4 years ago

@srs888001

I am using post request. Tried it again no luck !

srs888001 commented 4 years ago

It seems that you still use the RESTFul interface incorrectly. The parameters of the RESTFul interface post request are not directly spliced after the URL, but are put in the body.

projovi commented 4 years ago

Attached the REQUEST.

Screenshot 2020-07-29 at 6 04 59 PM Screenshot 2020-07-29 at 6 05 06 PM

I am using POSTMAN to send requests.

srs888001 commented 4 years ago

the request body needs to use JSON, not form-data

projovi commented 4 years ago

Worked ! Thanks