how to generate token for agora RTC for live stream and join channel - agora.io

i'm building live streaming application i wanna to use Agora RTC for live streaming. how to generate token from PHP server.
currently i'm generating tokens from this repository but token not working and streaming not initiating.
https://github.com/AgoraIO/Tools/tree/master/DynamicKey/AgoraDynamicKey/php/sample
i tried all tokens but noting happens

This document explains how to generate a token using the Agora token generator. You can take a look and see if you have entered the correct information in the token generator such as appID and channel name. Also you might need to check if you have put correct expiration time for your token. The expiration time should be in Unix timestamp.
https://docs.agora.io/en/Interactive%20Broadcast/token_server?platform=Android#reference

Related

How to get >24h refresh tokens for mobile app with Azure B2C?

We are currently looking into creating a mobile app with react native (expo). The whole authentication stuff works now after a bit of tinkering. But whats a problem for us is that apparently you are not able to get refresh tokens which are valid for longer than 24h when you use the code flow with PKCE.
As far as I've gathered from online resources it's recommended to use PKCE for mobile apps for security reasons. But having the user login do a complete login after 24h is kind of a show stopper for us.
What other options are there to use refresh tokens which are valid for more than 24h in a secure way for mobile apps?
Refresh tokens issued to SPAs application (PKCE flow) cannot be managed using B2C Sessions Management and are valid for 24 hours only.
After 24 hours, the app must acquire a new authorization code to get the new access and refresh token.
The only workaround option available is to use "Keep me signed in". In order to set the KMSI checkbox checked by default, you need to use JavaScript as there is no option available for this purpose in B2C user flow or custom policy.
It's documented very confusingly. But it turns out if you have registered your redirect URI as a Mobile/Native app, then B2C will just use whatever refresh token lifetime you have specified even with PKCE.
So if you use the redirect URI of an SPA (and you configured it as such). It will issue 24h refresh tokens no matter what you do.

Is there a REST api to create a channel in Agora Web sdk?

I'm trying to integrate our web app with voice/video call feature by using Agora. I have read the documentation on their side, but I have not found any rest api for web sdk to create channel. Basically, when a user joins a channel, we have to pass in the app id, token, and channel name. I know that we can create channel in agora dashboard, but I'm looking for a dynamic way, where we can trigger a REST api to do it. Any help would be greatly appreciated. Thank you.
You can deploy your own token server, that will give you the token based on a channel name and uid.
Here's a pre-built server that you can deploy to Heroku in 2 clicks.
I have been able to build a node js to generate agora io token. It is hosted in heroku. The source code can be found here:
https://github.com/Hoang-Minh/partie-agora-token-generator
Here are the endpoint that you can call to generate a token:
api/agora/rtcToken/:tokenType where
tokenType can be either uid or account, depends on what you need.
The default expiration time that I have is 24 hours.

Google Data Studio OAuth Client Verification - what to show in our in-app testing video?

We're in the process of trying to get our Google Data Studio connectors' OAuth Client Verified and the process requires a video of the application in use (as per https://support.google.com/cloud/answer/9110914), however the documentation mentions:
Note that the video must clearly show the app's details such as the
app name, OAuth Client ID, etc. as applicable. The demo video must
show usage of sensitive and restricted scopes on each client.
But we are not in control of GDS, only our connectors. We only use the /auth/script.external_request scope to make calls to our own API.
What should we include in our video to show this information?
Reference:
screengrab of the e-mail we received listing requirements
This is a Google OAuth verification requirement. You should ideally reach out to the OAuth verification team for clarifications.
However, for the video, you can try just opening up Data Studio and installing your connector using the direct deployment link. Then you can create a data source using the connector and draw a table to demonstrate how data is fetched from your API using the external_request scope.

Microsoft Graph - Longterm Access to OneDrive API (Refresh Token?)

Currently, I am using the Token Authentication Flow to connect MS Graph OneDrive API to my application. (Link to documentation) It works, yet I have to use Postman to get a new authentication token after 30min-2h (I'm not sure about the exact timeframe). I need to be able to access the OneDrive API for a longer period of time (multiple months) without having to authenticate again and again.
In the documentation, the also speak about the Code Flow (Link to Documentation). Yet I don't receive a refresh token nor do I know how to set it up for longterm access.
I wrote an application in python that uploads files from OneDrive to another application.
Any help is appreciated!
Perhaps not a direct answer but it could help you arrive to solution via another route. In my case, I was following the process presented here, which really then lets user choose if they would like be remembered on the device. Then token gets stored and the method attempts silent authentication before requiring interactive login. So basically you get to use Graph API seamlessly.
Obviously, the authentication still needs to happen but perhaps you could reuse the token for direct requests?

Parse Server and Stripe Events

I am hosting my parse server on Heroku. Before migrating my parse.com account, I used the webhooks feature of parse to process billing events from Stripe using the URL http:KEY#api.parse.com/1/functions/stripEvents in strip's webhooks.
I have installed the node Stripe module as per the instructions of the migration steps.
My understanding is that api calls are no longer supported in the parse server platform. How would I route/send posts sent from Stripe to a function inside the new parse server platform?
Thanks
I stand corrected, it does work.
www.your_app_name.herokuapp.com/path/functions/yourFunctionName is the URL to access a cloud function. You do however need to add the needed security keys. In the case of stripe you past this URL:
https://MASTER_KEY:javascript-key=JAVASCRIPT_KEY#your_app_name.herokuapp.com/v1/functions/FUNCTION_NAME
note that I mount my parse app on path V1.