Why are you changing from after on your 2nd request, to before on your 3rd? Using before is only for paginating backwards through previous pages of results you’ve already gone past.
You should keep using after and keep replacing the value with the cursor in your last request.