Need help to set up Youtube API - api

At first sorry if my english is not perfect !
I need help to create a dashboard for my company where I am in internship about their data on youtube.
Basically i need the same KPI,metrics and graph that you can find in youtube studio statistics.
But there is the problem I set up a project on google cloud platform and use the youtube anlytics api V2. But i fail to authentificate when i use the sample code from youtube documentation. On developer.google.com it's perfect, working smoothly and the data I retrieve is good but when i need to use postman to call my API is completely the shit.
It said that I need an Oauth 2 key but i have it.
for example : curl
'https://youtubeanalytics.googleapis.com/v2/reports?dimensions=day&endDate=2022-07-04&ids=channel%3D%3DMINE&metrics=estimatedMinutesWatched&sort=day%2C&startDate=2022-01-01&key=[YOUR_API_KEY]'
--header 'Authorization: Bearer [YOUR_ACCESS_TOKEN]'
--header 'Accept: application/json'
--compressed
this code work on youtube documentation because I authentificate with the youtube channel of my company but i have the main account and a youtube channel link to it.
I think the problem is i need to create the project with the youtube channel but how can i do that ???
I search everywhere and didnt fint anything about it.
And with Postman what call i have to do ?
I'm not a pro but i work on google analytics and linkedin API and it was fine but here i just want to destroy my computer.
I already create the API key and the ID clients OAuth 2.0 replace everything i could on the request but nothing
Someone know what to do ?
Thanks for all your reply

Related

How does cURL work in live server or web development?

can someone here explain to me how does cURL works in web development? I'm integrating a 3rd party tool to a Shopify website and found the documentation of it that says I can authenticate the API token using cURL but I don't know how does this cURL really works, read a bunch of articles and documentation, saw some youtube video about it but it still go thru my thick skull.
As of my understanding cURL is a CLI tool? and then what? how does that work in the live server? like this code below, where should I put it on in the live server? if It is a CLI tool then what to do in the live server? or am I going to the wrong direction? I hope I;m making sense
curl -X GET 'https://sample.com/sample?api_token=123123' -H 'accept: application/json'

API authentification token

I have recently learnt about API and started using them for learning purpose.
I have tried the twitter API,but there is something I don't understand
Process of sending tweets with an API
Get your API token (need to tell a lot of informations and wait some time before it's validated)
Make http post request with the token to 'https://api.twitter.com/1.1/statuses/update
Tweet posted successfully
Process of sending tweets with your browser:
Create an account (don't need that much information, it's instant)
Login, write a tweet
When you click on submit, a http post request is sent (to the same url that above) and there is a Bearer token in the request header
Tweet posted successfully
So that leads to my question, why should I contact twitter to have an API token, if I can have one just by creating an account ?
How do twitter back-end know that the request is coming from a browser (normal use) or if it's coming from a third part app ?
The direct answer to your question is that the only approved way (inside of the Terms of Service) of sending Tweets programmatically is to use the official API.
There are a variety of ways in which websites and web services can detect browser automation or usage, and that's not really a question for a programming community like Stack Overflow.
What exactly are you trying to do, and why would you choose not to use the supported official API?

How can I get my redirection link accepted by Facebook community standard?

I am using Branch for redirecting users to their corresponding app store but also to track where the user comes from. However I can't find a way to put a trackable Branch link on Instagram or Facebook. It gets rejected not following 'Community Standard'.
So I am in this situation:
app.myapp.com => redirection accepted by Community Standard but no tracking link
app.myapp.com/zJQj4nY6fX?ref=trackingref => rejected by Commynity Standard.
The ref allows me to do the tracking.
Anyone has a suggestion ? I have also checked at Branch workaround but can't really understand what to do in the workaround.
Thank you for your help!
Sorry to hear about the issue with posting your link to Facebook. How are you sharing these links in Facebook? When sharing links to Facebook via their newsfeed, messaging features, etc they will block links if they determine the link violates Facebook's community guidelines, links can be flagged as spam and may be blocked from being posted if:
Facebook detects that the post includes a link to a malicious website
Attempts were made to post the same link multiple times or in multiple places
You will want to reach out to FB support to get your link unblocked https://www.facebook.com/help.
You also can set up monitoring for all your links using Facebook's Open Graph API. You can ping Facebook's Open Graph servers at regular intervals to check if the link has been blocked and immediately contact Facebook to resolve this issue.
curl -X POST \
-F "id={object-url OR object-id}" \
-F "scrape=true" \
-F "access_token={your access token}" \
  "https://graph.facebook.com"
The API returns OG information for a valid link and fails if the link is blocked by Facebook.
If you are running ad campaigns, I would recommend using Branch's Universal Ads feature with FB Ads as Branch is a FB MMP and this should keep your links from being blocked.
https://docs.branch.io/deep-linked-ads/branch-universal-ads-mobile-tracking
https://docs.branch.io/deep-linked-ads/facebook-ads-overview/#facebook-ads-overview
Hope this helps!

How can I get hold of a Google Calendar API?

I'm trying to integrate my Google Calendar with a plugin I installed on my page.
To do so I need the ID and the API of the calendar.
I managed to find the ID following Google's support page, but it's hours now that I've been trying to get hold of the API.
Firstly this and more can be answered here: http://amazewebs.com ...the home to 1-to-1 google api help with lots of videos, guides, examples, templates and code submissions.
see demo: http://amazewebs.com/demo
To get a Google API you need to setup an API script to call the Google servers.
This can be achieved with OAuth Authentication with either:
a Client Account or...
a Service Account
Head to here to setup your API's & Auth:
https://code.google.com/apis/console
Head here for official documentation:
https://developers.google.com/accounts/docs/OAuth2ServiceAccount

Does Facebook API video-upload work only with OAuth v1?

I cannot get video upload to work with OAuth 2 access-token. The request always fails to even connect (timeout).
http://developers.facebook.com/docs/reference/rest/video.upload
With almost identical code, I have successfully uploaded photos.
The only video-upload example code I can find uses OAuth 1.x. Does video not yet support OAuth 2?
Thanks to all who read this.
AFAIK this is the case. New graph api still missing some of the functionality from old REST api. And that includes uploading video. You should be able to use REST api with access token to do things not yet supported by graph api.