How to get Instagram profile? - instagram-graph-api

How to get user information about himself (real name and avatar) using Instagram Graph API or Instagram Basic Display API?

https://developers.facebook.com/docs/instagram-api/getting-started
curl -i -X GET \
"https://graph.facebook.com/v5.0/me/accounts?access_token={access-token}"

Related

Getting 404 from the Twilio Voice Insights API when fetching summaries and metrics

I am trying to get the the summary for call records from the rest API and I am getting
404 every time on every single calls SIDs. I am using latest version of twilio-python helper library to send requests.
insights_response = client.insights.v1.calls.get(CALL_SID).summary.get().fetch()
I tried the same thing with CURL and got the same results.
curl -X GET https://insights.twilio.com/v1/Voice/CAxxxxx/Summary \
-u "sid:auth token"
We have insights enabled on console as well and can see those records on console. I need to access them via API.
Do you have advanced voice insights enabled?
Advanced Voice Insights
https://www.twilio.com/docs/voice/insights/advanced-features

How can I update Presence/Status/Availability in MS Teams via an API call?

I am aware of the beta Graph Presence API. However, this currently only allows retrieving Presence data. I would like to be able to change a Teams user's status availability using an api call. The most recent information that I could find is several years old: (Does Microsoft Teams have a way to update a user's status/presence?)
If the Teams API does not contain this functionality, can it still be done via the underlying UCWA API if that is still available for Teams? Or, more generally, is there some other way to have an external application update a Teams user's status availability?
Alternatively, is there a way to update the availability/status in Office 365 via an api call?
if you login to teams web app and change availability status, you can see that the app is actually making PUT call to https://presence.teams.microsoft.com/v1/me/forceavailability/ with simple JSON body
{"availability":"Busy"}
It's unofficial probably, but maybe worth checking out?
For anyone still interested, there's a new API available that allows to set user presence with application permission type.
https://learn.microsoft.com/en-us/graph/api/presence-setpresence?view=graph-rest-1.0&tabs=http
I've tested it and it seems to "mostly" work. I've observed 2 issues:
user for whom the presence is set, does not see an update in their teams client (both desktop/web/mobile). Other people see the status is changed though.
Setting Away/Away does not work - status is changed to Available/Available.
So although it's in 1.0 version, for me it's still more beta.
Lukasz was correct, only thing is you need to provide bearer token as well in the header for authorization
curl --location --request PUT 'https://presence.teams.microsoft.com/v1/me/forceavailability/' \--header 'Authorization: Bearer your_token_here --header 'Content-Type: application/json' \--data-raw '{ "availability": "Busy"}'

Youtube API V3 how can i get channel username

I need to use youtube username in a javascript script that retrieves data from youtube API with username
the problem is that this channel has a custom url in format:
https://www.youtube.com/c/myname
but from tutorial and video i found i need to get the user from a custom url like this
https://www.youtube.com/user/myname
since, as far as i know, is not possible to set an url and surname based on second url for newer channel how can i found the username?
any way to get it with API?
youtube.channels.list does NOT provide the username. you have to use Google+ API to get it.
tube_dl is the answer.
pip install tube_dl
This module is a great video downloader and youtube parser.
Here's the sample code:
from tube_dl import Youtube
yt = Youtube('your video id').channelUrl
For tube_dl documentation, visit Github Page of tube_dl
You can try out the Channels.list method on the YouTube Data API. You can pass the username and it will return the list of channels that said user have.
The YouTube Data API developer site has more information if you want to learn more about it.

How to get Youtube page's username Using Youtube API

I am trying to find the page's username through the Youtube API (******#pages.plusgoogle.com). I'm not getting this information through a request like: GET https://www.googleapis.com/youtube/v3/channels?part=snippet&mine=true
What should I do?
PS: I'm using the PHP Library.
Its not possible to get the /c/username or the /user/username via the YouTube API at this moment.

Posting A Message From a Website To Twitter

Is it possible to post a message from a website to twitter account? For Example, If a user post a comment in my website, that comment should also be posted to my twitter account. Is there any API or any PHP based scripts?
Have a look at http://emmense.com/php-twitter/; it uses curl to communicate with twitter.
There is a Twitter API ; you can check it out here https://dev.twitter.com/

Resources