Accessing cloudflare pages with service keys

I have setup a website to deploy to cloudflare pages and have set it behind cloudflare access. I am trying to hit the site using service key to bypass the access and test the site. I wrote a script which hits the page url (cloudflare page url and not the team-name.cloudflareaccess.com) along with the CF-Access-Client-Id and CF-Access-Client-Secret as request header . I was expecting to receive the CF-Authorization-Token in the header response as per the documentation but i only receive session cookie. I am new to this and would like to understand where i am going wrong here. Thanks in advance.