# PKCE Flow From Console .NET Core App to Web API

**URL:** <https://devforum.okta.com/t/pkce-flow-from-console-net-core-app-to-web-api/14244>\
**Category:** Questions\
**Created:** [May 14, 2021, 3:42pm UTC](https://devforum.okta.com/t/pkce-flow-from-console-net-core-app-to-web-api/14244 "2021-05-14T15:42:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![igalfsg](https://avatars.discourse-cdn.com/v4/letter/i/8e8cbc/32.png) [@igalfsg](https://devforum.okta.com/u/igalfsg)\
**Post date:** [May 14, 2021, 3:42pm UTC](https://devforum.okta.com/t/pkce-flow-from-console-net-core-app-to-web-api/14244/1 "2021-05-14T15:42:17Z")

</div>

I have a SPA app setup with PKCE flow and .NET Core backend. I can login through the Web UI but I would also want to have API Access through a .NET core Console application, is there a way for the user to get a token for their console application? maybe a redirect to the browser or something?

---

<div class="post-metadata">

**Author:** ![andrea](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/andrea/32/2172_2.png) [@andrea](https://devforum.okta.com/u/andrea)\
**Post date:** [May 17, 2021, 3:43pm UTC](https://devforum.okta.com/t/pkce-flow-from-console-net-core-app-to-web-api/14244/2 "2021-05-17T15:43:11Z")

</div>

Maybe check out this example, which does exactly that: pops-up a browser to handle the authorize redirect when user and requests/returns back tokens in the console: [GitHub - oktadev/pkce-cli: PKCE Command Line](https://github.com/oktadev/pkce-cli)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/oktadev/original/1X/589c4c5f80de422d01f47cee7185a7fb8227835c.png) [@system](https://devforum.okta.com/u/system)\
**Post date:** [February 8, 2024, 6:10pm UTC](https://devforum.okta.com/t/pkce-flow-from-console-net-core-app-to-web-api/14244/3 "2024-02-08T18:10:13Z")

</div>

Closed on February 8, 2024, 6:10pm UTC

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
