Git Product home page Git Product logo

Comments (6)

waqadArshad avatar waqadArshad commented on June 11, 2024 1

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.

from videouikit-flutter.

maxxfrazer avatar maxxfrazer commented on June 11, 2024

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.

from videouikit-flutter.

waqadArshad avatar waqadArshad commented on June 11, 2024

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.

from videouikit-flutter.

waqadArshad avatar waqadArshad commented on June 11, 2024

@maxxfrazer and I think you should at least wait for the Author's answer before closing an issue.

from videouikit-flutter.

maxxfrazer avatar maxxfrazer commented on June 11, 2024

The correct URL for you and your colleague is:
"https://nikah----match.herokuapp.com"

This project is all open source, corresponding code is here:
https://github.com/AgoraIO-Community/Flutter-UIKit/blob/829db279ad14a4af6828cb522ca96b8c2a3dd9d4/lib/controllers/session_controller.dart#L631

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 "https://nikah----match.herokuapp.com/rtc/test/publisher/uid/0", then we will have an issue.

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}');
  }
}

from videouikit-flutter.

maxxfrazer avatar maxxfrazer commented on June 11, 2024

No answer from author… closing issue again

from videouikit-flutter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.