How to create Agora channel name and token via API from the web server - agora.io

I want to create the Agora https://www.agora.io/en/ channel name and token by using the Agora API in Laravel.
Anyone can help, please.

You would have to use the Agora web SDK(JavaScript) to accomplish this since there are no laravel SDKs from Agora. You can basically drop all the agora related js code into a <script> tag inside your HTML template. Right after the agora import.
<script src="https://cdn.agora.io/sdk/release/AgoraRTCSDK-3.1.1.js"></script>
<script>
// Agora related code goes here
</script>
For developing a barebones application, you can read this: https://medium.com/agora-io/video-calling-using-agoras-javascript-sdk-73ba0a315cbd
As far as the token server goes, Agora has a PHP token server implementation here: https://docs.agora.io/en/Video/token_server_php?platform=PHP

Related

Salesforce LWC Locker Compliant <> Twilio Javascript SDK

thank you for reading
I'm creating a Computer Telephony Integration with Twilio and Salesforce
I need to call to a (customer) Phone using the microphone of my computer and the browser to handle the call
I already achieved it with HTML, CSS and JS in local and hosted webpage
I'm trying to achieve this with LWC (Lightning Web Components) of Salesforce to handle this in an app inside Salesforce.
I'm not sure but I'm having troubles trying to use the library (added as Static Resource: https://developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.js_third_party_library)
I think it's the Locker Compliant https://developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.js_third_party_guidance
`import { loadScript } from 'lightning/platformResourceLoader';
import Twilio from '#salesforce/resourceUrl/twilio2';
loadScript(this, Twilio)
`
Everything seems good but then I have
'Error setting up Twilio device: Cannot read properties of undefined (reading 'setup')'
So library is not being included I think
Thank you very much
Happy coding
I've achieved to handle the call with a local/hosted webpage but not inside Salesforce homepage using my LWC component

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.

How to Get Third party REST API data to LARAVEL.?

I am developing a laravel web application. I want to get third pary website ( Mavenlink ) --> http://developer.mavenlink.com/ API Data. but i am new in api developing. how to get only the API of external site.
API URL : https://api.mavenlink.com/api/v1/
How to get the data with Laravel 4, once i googled, i can see a OAuth2 tokens . What is this ?
Please give me good solution for this, Now am stoped my project.
Thanks & Regards
What you are looking for is using Guzzle. It will enable you to make all of the HTTP calls you need for an external API. See this article: How to autoload Guzzle in Laravel 4?

Phonegap/Cordova App to connect a api

I have a simple REST API made in Rails with output data in json format.
I want create a phonegap app to connect and consume the API resources. someone know a tutorial to do this.
I am only a junior backend dev and no know about mobile apps.
Thanks in advance
forget, i found this Cordova Tutorial that use jQuery Ajax

tagged push notification to android (google cloud messaging) using azure

I am using Azure's Notification Hubs REST APIs to create a Native registration for Google Cloud Messaging with a tag. (http://msdn.microsoft.com/en-us/library/dn223264.aspx)
The API call runs successfully and returns a RegistrationId as well as my tags in the XML response:
<GcmRegistrationDescription
<RegistrationId>222222222222222222222-1111111111111111111-2</RegistrationId>
<Tags>toto ,titi</Tags>
</GcmRegistrationDescription>
However with the debug console, I fail to push a message to that tag with the error below:
No registrations with the tag "toto" were found for the selected platform.
The Read Registration method of the REST api does not return the tags either. It returns an Etag element.
<GcmRegistrationDescription>
<ETag>4</ETag>
<RegistrationId>222222222222222222222-1111111111111111111-2</RegistrationId>
</GcmRegistrationDescription>
The same works great for the iPhone when creating a Native registration for Apple Push Notification Service.
Any ideas on what I missed would be greatly appreciated!