How to use Twilio new Room Rest API instead of Configuration Profile SID? - rest

Twilio recently stopped their Configuration Profile SID in favor of the new Room Rest API.
Previously I used to create an access token with the configuration profile SID grant and then pass the access token to javascript to connect the participants:
$callerCallId = substr(md5(microtime()), 0, 15);
$callerAccessToken = new Services_Twilio_AccessToken($accountSid, $apiKeySid, $apiKeySecret, 3600, $callerCallId);
$callerConversationGrant = new Services_Twilio_Auth_ConversationsGrant();
$callerConversationGrant->setConfigurationProfileSid($configurationProfileSid);
$callerAccessToken->addGrant($callerConversationGrant);
$callerToken = $callerAccessToken->toJWT();
With the new REST API, what do I do? Twilio's official documentation is not helpful at all.

Twilio developer evangelist here.
If you are on the Video Group Rooms private beta, then you should be able to see the documentation here. You actually don't need to change anything about the way you authorize your users, you will still need to generate the JWT from your server and pass it to the client.
The difference is that rather than creating and joining the room from the client, you will want to use the REST API to create the room first. Then you can use the room name in the client to join that room.
If you have feedback on the API, the documentation or anything about Group Rooms then please get in contact with the Video team on video-product#twilio.com.

Related

How to get Authenticated user's Google Ad Account ID using Google Ads API v0 using a REST API?

I have been trying to figure out after referring to their official documentation (Google Ads API Document) which is not clear enough
Here is what I have tried till now.
I have created an app where users can log in with their Google Ad words account. I need to fetch their Ad performance reports via REST API.
To make an API request to fetch performance reports, we need the Google Ad Words Account ID of the authenticated user. Currently, as I am testing it with my personal account, I can login to my Ad words Console and get the Ad Words Account ID. But, how do I fetch the Ad Words Account ID dynamically for other users who authenticate via my App?
I tried looking for a way in their official documentation. But I couldn't figure out.
Could someone help me with the REST API URL which needs to be called to fetch the authenticated user's Ad words Account ID.
In addition to previous answer, I guess this is what you are looking for:
https://developers.google.com/adwords/api/docs/guides/first-api-call#create_test_accounts
It explains how to setup Google Ad Words API and get your ID.
According to the documentation here Account overview, you need to list the customers to get the ID. For each user that logs in as long as they do not have access to multiple accounts you should get a single customer and their ID.
CustomerService
CustomerService provides information about your accounts. It has a
getCustomers() method that takes no arguments and returns a list of
Customer objects containing fields such as customerId, currencyCode,
and dateTimeZone. CustomerService also has a mutate() method that can
be used to update various attributes of a customer, including the
autoTaggingEnabled and conversionTrackingSetting fields.
If no clientCustomerId is specified in a request, the response will
contain multiple entries if more than one account is directly
accessible by the authenticated account.

How would I create an access token for the NFL Shield API?

The NFL appears to have an API service here: https://api.nfl.com/docs/getting-started/index.html
Accessing the API endpoints requires obtaining an OAuth2 access token. Which, if I am not mistaken, requires a client_id and client_secret.
I have read through the documentation and I am not sure how I would obtain a client_id and client_secret. Is there something I am missing to create these?
Finally got an answer on this. The documentation does say that the API is public and free for everyone, but they changed that policy and haven't updated the documentation.
Hi Dominic,
Thanks for reaching out. As of Feb. 18th, the NFL has secured the APIs and will only grant access to contractual partners. Unfortunately, if you are NOT a NFL Partner you will no longer have access to the feeds or able to obtain access to this feed.
Thanks,
Jonathan Vu
Product Operations Manager

Moodle user enrollment to a course using Api

I am new to Moodle, but I am setup site in local server. Created new courses, users into it. I want to enroll a patient to a specific course (created using admin side) through Javascript API. Are any options to enroll a user in a course. I couldn't find any Apis for enroll section
Javascript API ? moodle uses PHP API and has also WebService API.
See this nice ws example : Using MOODLE create users and enroll them in courses via SQL
You could also call the WebService API via JS..

LinkedIn Group API changes

As far as I can tell, with the new changes to the API's, LinkedIn's Group api's are no longer public at all. Are there any ways to access the posts made in a group without using the Group api?
All I'm looking to do is to read the posts from a public group.
There is no way to access that API publicly any longer. You would need to apply to be part of their partner program to get access to those endpoints once again:
https://developer.linkedin.com/partner-programs/apply

Google + Domains API domain wide delegation

I am trying to write a powershell script that uses the Invoke-RestMethod to connect to the Google + Api and authenticates with a service account that has been granted domain wide delegation of authority. Then I want to use a list names to retrieve the google + userid and from there I want to create a circle and insert all of those users into that circle.
The main issue I am having is retrieving the userid for the list of users, I think I would be able to figure the rest out once I had that piece.
Thanks
The Google+ Domains API is unique in that it allows you to make API calls using email addresses in the place of the Google+ ID. This means that if you have a list of users within your domain, you may make API calls on their behalf, by specifying their email address when building the authorized API client.
In Java, this is done by calling setServiceAcountUser on your GoogleCredential:
GoogleCredential credential = new GoogleCredential.Builder()
.setTransport(httpTransport)
.setJsonFactory(jsonFactory)
.setServiceAccountId(SERVICE_ACCOUNT_EMAIL)
.setServiceAccountScopes(SCOPE)
.setServiceAccountUser(USER_EMAIL)
.setServiceAccountPrivateKeyFromP12File(
new java.io.File(SERVICE_ACCOUNT_PKCS12_FILE_PATH))
.build();
For additional examples and information, check out https://developers.google.com/+/domains/authentication/delegation.
Also, if you do wish to compile a list of Google+ IDs, you need only make a people.get API call using the email address for the authenticated user, and the Google+ ID will be included in the Person response. (https://developers.google.com/+/domains/api/people/get)