Skip to content
This repository was archived by the owner on May 15, 2025. It is now read-only.
This repository was archived by the owner on May 15, 2025. It is now read-only.

OKTA C# get token by user name and password #56

@rathoregee

Description

@rathoregee

Hi Guys
I am writing a integration test for aws lamda autoriser for api gateway.

do we have any c# code example to get jwt tokens (id, access) by using (username, passord)

by making c# httpclient call to Okta?

some kind of CURL for example

curl --location --request POST ‘https://org.okta.com/oauth2/v1/token’
–header ‘Accept: application/json’
–header ‘Content-Type: application/x-www-form-urlencoded’
–header ‘Content-Type: application/x-www-form-urlencoded’
–data-urlencode ‘grant_type=password’
–data-urlencode ‘username=test.user’
–data-urlencode ‘password=p@ssw0rd’
–data-urlencode ‘scope=openid’
–data-urlencode ‘client_id={{clientId}}’

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions