# Using the go sdk to generate oidc/oauth2 credentials?

**URL:** <https://devforum.okta.com/t/using-the-go-sdk-to-generate-oidc-oauth2-credentials/21449>\
**Category:** OAuth/OIDC\
**Created:** [August 2, 2022, 6:39am UTC](https://devforum.okta.com/t/using-the-go-sdk-to-generate-oidc-oauth2-credentials/21449 "2022-08-02T06:39:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pputman](https://avatars.discourse-cdn.com/v4/letter/p/ac91a4/32.png) [@pputman](https://devforum.okta.com/u/pputman)\
**Post date:** [August 2, 2022, 6:39am UTC](https://devforum.okta.com/t/using-the-go-sdk-to-generate-oidc-oauth2-credentials/21449/1 "2022-08-02T06:39:12Z")

</div>

I’m trying to develop an application in go, that will authorize via an oidc app’s client ID and secret, and then generate other temporary credentials.

I found this in the golang sdk:

> <https://github.com/okta/okta-sdk-golang/blob/b4946d7139279efce0a539ab766aa7e6fdd34231/okta/openIdConnectApplication.go>

It’s a struct for open ID connection applications with the credentials, but no way to actually connect with those credentials.

am I missing something, or is this just not implemented in the sdk, and I’ll have to connect directly via http instead of prewritten functions/methods?

---

<div class="post-metadata">

**Author:** ![erik](https://avatars.discourse-cdn.com/v4/letter/e/b5ac83/32.png) [@erik](https://devforum.okta.com/u/erik)\
**Post date:** [August 12, 2022, 11:18pm UTC](https://devforum.okta.com/t/using-the-go-sdk-to-generate-oidc-oauth2-credentials/21449/2 "2022-08-12T23:18:07Z")

</div>

Hello,  
The SDK you are using is the Go Management SDK which uses the Okta Management REST API.  
The file linked is for creating an OAuth2 application.

If you want to see samples in Go with Okta you should use [this repo](https://github.com/okta/samples-golang).

---

<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 12, 2024, 9:50pm UTC](https://devforum.okta.com/t/using-the-go-sdk-to-generate-oidc-oauth2-credentials/21449/3 "2024-02-12T21:50:22Z")

</div>

Closed on February 12, 2024, 9:50pm UTC

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