Shell에서 redirect url code 추출하는 방법 문의

브라우저에서는 정상적으로 redirect url 에 https://automessage.com/authentication?code={인가 code 값}을 확인할 수 있는데
shell command로 get 요청을 하였을때, header 값의 Location에 아래와 같은 값이 확인이 안됩니다.

[python request 요청]
r= s.get(self.login_url,allow_redirects=False)
print(r.headers['location])

-> 원하는 header의 location 값.
https://automessage.com/authentication?code={인가 code 값}

->확인되는 값.
https://accounts.kakao.com/login?continue=https%3A%2F%2Fkauth.kakao.com%2Foauth%2Fauthorize%3Fresponse_type%3Dcode%26redirect_uri%3Dhttps%3A%2F%2Fwww.autokmessage.tk%2Fauthentication%26client_id%{client_id}

shell에서는 redirect된 url로 발송되는 code 값을 request header 를 통해 확인이 불가능한가요?

혹시 파싱하는방법이 있다면, 어떻게 파싱을 해야하는지 자문을 구합니다.

안녕하세요!

shell 명령을 통해서 인가코드를 요청하는 경우
사용자 동의가 필요한 경우 사용자로부터 동의를 받을 수 없게 됩니다.

브라우저를 통해서 인가코드를 요청해주셔야 사용자 동의를 받아서 코드를 발급받으실 수 있습니다.