I’m trying to create a way to block various services (YouTube / TikTok) some of my devices during a set of time. I’m using Adguard as ad blocker and this allows to communicatie through OpenAPI to this platform. If I add a device to Adguard and select the appropriate services, this is exactly what I would like (blocking internet all together results in switching to 4G for the specific devices and doesn’t help me).
Now I’m using the HTTP flow cards app (HTTP request flowkaarten App voor Homey | Homey) to try and achieve this. I just can’t seem to find out how to do the authentication. I need to do a ‘basic auth’.
Besides this, i’m running into some issues which are directly related to my knowledge.
- I can add ‘manually’ a new device to addguard. with the POST command:
URL: https://adguard.hoogenbosch.cloud/control/clients/update
{ “name”: “iphonevnMartijn”,“data”: { “name”:“iphonevnMartjin”, “blocked_services”:[“9gag”,“amazon”,“dailymotion”,“discord”,“disneyplus”,“ebay”,“epic_games”,“facebook”,“hulu”,“imgur”,“instagram”,“mail_ru”,“netflix”,“ok”,“origin”,“pinterest”,“qq”,“reddit”,“skype”,“snapchat”,“spotify”,“steam”,“telegram”,“tiktok”,“tinder”,“twitch”,“twitter”,“viber”,“vimeo”,“vk”,“wechat”,“weibo”,“whatsapp”,“youtube”], “ids”:[“192.168.0.125”], “tags”:[“user_child”], “upstreams”:, “filtering_enabled”:true, “parental_enabled”:false, “safebrowsing_enabled”:false, “safesearch_enabled”:false, “use_global_blocked_services”:false, “use_global_settings”:false} } }’
I am able to update this client. Unfortunately I can do this only once. The second time it says it cannot find the client. Btw; i’m doing this with the YARC client, because this can do authentication.
- I cannot understand how to ‘add’ a new client. I changed the url by replacing ‘update’ with ‘add’, but it asks for an ID, don’t know where to fill this information.
So bascially multiple questions.
I’m pulling my information from https://github.com/AdguardTeam/AdGuardHome/tree/master/openapi