Add basic authentication using an api key and add group_ids to devices