0

I am creating an app related to customer service and marketing through social media and YouTube are the project i am working on.

I have a job to obtain ads related data from YouTube api. I need to show this data on my app so our client can make sure that their money used in promoting their YouTube channel are not wasted. i am used to work in this api social media related field but this project really give me headache.

First of all i am confused where to start to get the data i obtain. i try to see YouTube analytics and reporting data but keep getting this error when im trying their api.

picture of error

{
  "error": {
    "code": 403,
    "message": "Forbidden",
    "errors": [
      {
        "message": "Forbidden",
        "domain": "global",
        "reason": "forbidden"
      }
    ]
  }
}

i has enable the Youtube analytic and reporting api on my console

my active api

The coding language that i think i wii use is php so it will be great if you can give sugestion.

daniel adi
  • 63
  • 3
  • Please edit your question and include your code specifically your authentication code and what methods you are calling. – DaImTo Jun 23 '20 at 08:37
  • @DaImTo i havent code anyhting i just try using youtube api through their document to gets my ads performance but it return error as you can see in the picture. the youtube api that i already use on my api are youtube data api v3 which i dont have any question about and not related to this question. or can you give me suggesstion ? – daniel adi Jun 23 '20 at 10:24
  • **The coding language that im using right now is php.** – DaImTo Jun 23 '20 at 10:29
  • @DaImTo sorry for misleading description. i still triying it in youtube document here https://developers.google.com/youtube/analytics/reference/reports/query?apix=true&apix_params=%7B%22metrics%22%3A%22views%2CestimatedRevenue%2CestimatedAdRevenue%2CestimatedRedPartnerRevenue%2CgrossRevenue%2CadImpressions%2Ccpm%2CplaybackBasedCpm%2CmonetizedPlaybacks%22%2C%22dimensions%22%3A%22day%22%2C%22startDate%22%3A%222014-05-01%22%2C%22endDate%22%3A%222014-06-30%22%2C%22ids%22%3A%22channel%3D%3DMINE%22%7D just like my image. havent code it yet since i dont think i can use it yet because of the error – daniel adi Jun 23 '20 at 10:59
  • @DaImTo but i intent to use php code language – daniel adi Jun 23 '20 at 11:00

1 Answers1

0

If you are not the main user and have just granted rights then maybe this will help:

YouTube APIs - Access mutiple youtube channels (Brand Accounts) using Google Admin account