A doctor can grant a medical certificate for stress leave if they believe you are genuinely unable to work due to worsened mental health. It is important to discuss what symptoms you are experiencing with the doctor so they can not only provide a certificate but also advice for better long-term mental health if required.
For a doctor to grant you time off work, you must sufficiently be able to explain your situation and symptoms and how these make you unable to fulfil your work responsibilities for the time period you are requesting.
The decision for how long the medical certificate grants leave is up to the doctor and the severity of the stress. Whilst a doctor may decide to reject the request if they feel the request is not genuine, reasonable requests in genuine cases are granted commonly in practice.
Online consultations may be suitable for short-term stress leave requests, whilst long-term stress leave requests should be handled by your regular physician for a long-term mental health plan.