-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] tokenUrl is not generating the token and giving a 404 Not Found #73
Comments
addressed in AgoraIO-Community/agora-token-service#22 @waqadArshad to save yourself time, it might be easier to use Postman, or a similar tool for checking that your token server is running properly. |
The token is being generated when I am using the link in a browser. The thing is that there is no documentation stating, how that link is being used by the Agora UI Kit. I mean which parameters are being placed where inside the link, is not documented at all. |
@maxxfrazer and I think you should at least wait for the Author's answer before closing an issue. |
The correct URL for you and your colleague is: This project is all open source, corresponding code is here: I'd suggest modifying the local copy of that to print out the full URL that it uses, just to check. If it comes back with anything other than This is a small dart script that uses the same code and prints the token correctly: import 'package:http/http.dart' as http;
import 'dart:convert';
void main(List<String> arguments) {
getToken(
tokenUrl: "https://nikah----match.herokuapp.com",
channelName: "test",
uid: 0,
);
}
Future<void> getToken({
String? tokenUrl,
String? channelName,
int uid = 0,
}) async {
final response = await http
.get(Uri.parse('$tokenUrl/rtc/$channelName/publisher/uid/$uid'));
if (response.statusCode == 200) {
print(jsonDecode(response.body)['rtcToken']);
} else {
print(response.reasonPhrase);
print('Failed to generate the token : ${response.statusCode}');
}
} |
No answer from author… closing issue again |
Yes sorry for the delayed response. I was really busy these past few days. Yes, it seems to be working just fine now. @maxxfrazer Thanks a lot for the help. I really appreciate it. |
@maxxfrazer @Ascenio @hxingpax @Meherdeep @tadaspetra
Describe the bug
agora_uikit: ^0.0.4
agora_rtc_engine: ^4.2.0
I hosted
https://github.com/AgoraIO-Community/agora-token-service
server on Heroku and just copied the base Url of the server: https://nikah----match.herokuapp.com/ as the tokenUrl in the AgoraConnectionData constructor as given here:and got the error:
What else I tried:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A token is generated and the call starts.
Screenshots
If applicable, add screenshots to help explain your problem (N/A).
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 2.10.3, on Microsoft Windows [Version 10.0.19044.1526], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Build Tools 2019 16.11.10)
[√] Android Studio (version 2021.1)
[√] IntelliJ IDEA Community Edition (version 2021.3)
[√] VS Code (version 1.65.2)
[√] Connected device (4 available)
[√] HTTP Host Availability
• No issues found!
The text was updated successfully, but these errors were encountered: