0

I am using https://youtube.googleapis.com/youtube/v3/ v3 of the Youtube API which works perfectly with examples such as id=UCe5TCe6L-uYM106WzSIKuYQ or forUsername=unisportlife in the calling URL. However I have now come across youtube users with an @ sign in their URL and have tried both forUsername and id and neither seem to pull through the Video feed. How do we tackle that in V3?

On further investigation, UCZ0SxS_c5V0mPgNMyWgVyig actually is equal to @ModernDayGK. When I use the UCZ with id I get video results, but switch this to %40ModernDayGK (with id or forUsername and I get:

{
  "kind": "youtube#channelListResponse",
  "etag": "RuuXzTIr0OoDqI4S0RU6n4FqKEM",
  "pageInfo": {
    "totalResults": 0,
    "resultsPerPage": 5
  }
}

So clearly something has changed ?

Benjamin Loison
  • 3,782
  • 4
  • 16
  • 33
Antony
  • 3,875
  • 30
  • 32
  • have you tried url-encoding the value? – TZHX Mar 29 '23 at 13:40
  • I hadn't, have now but still no success – Antony Mar 29 '23 at 13:42
  • See [my answer](https://stackoverflow.com/a/75843807) on a similar question. – Benjamin Loison Mar 29 '23 at 13:43
  • It could be me - in that they don't actually have any channels setup and that is my go-to endpoint! Just trying to see if i can access videos. – Antony Mar 29 '23 at 13:46
  • Actually - I'm updating my question because I've found an anomaly. – Antony Mar 29 '23 at 14:18
  • Handles aren't supported (even if they are URL encoded) by YouTube Data API v3 (cf the link I shared above). Your question `So clearly something has changed?` is unclear as you don't present previous working example contrarily to the same one not working nowadays. – Benjamin Loison Mar 29 '23 at 15:03
  • @Antony how do you obtained the `forUsername` values? - in YouTube Data API, it's not documented the use with handles, so, I rather user `channel_id` as parameter for the search - as I show in [my answer](https://stackoverflow.com/a/75325524/12511801) – Marco Aurelio Fernandez Reyes Mar 31 '23 at 15:15

0 Answers0