---
title: "Create From Oauth Callback"
method: POST
path: "/api/v1/integrations/credentials/oauth/callback"
tags: ["Integration Credentials"]
---

# Create From Oauth Callback

`POST /api/v1/integrations/credentials/oauth/callback`

Create a new credential from an OAuth callback.

Finalizes the OAuth flow for a given provider:

1) The frontend initiates the flow by taking the user to the provider's authorization page.
2) The user authorizes the application and is redirected back to the frontend.
3) The frontend sends the code to this endpoint.
4) This endpoint creates a new credential for the provider and returns a credential card.

## Request body

- CreateOauthConnection
  - `credential_id` string, uuid, required — The unique identifier of the credential
  - `provider_id` string, required — An unique identifier for the provider.
  - `credential_name` string, required — The name of the credential, used to identify it in the web UI
  - `credential_description` string, nullable
  - `code` string, required
  - `code_verifier` string, nullable

## Response `201`

Successful Response

- IntegrationCredentialCard
  - `credential_id` string, uuid, required — The unique identifier of the credential
  - `integration_provider_id` string, required — An unique identifier for the provider.
  - `credential_name` string, required — The name of the credential, used to identify it in the web UI
  - `credential_description` string, nullable
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required
  - `created_by` ReducedUserProfile, required
    - `user_id` string, required
    - `first_name` string, required
    - `last_name` string, required
    - `email` string, required
    - `avatar_url` string, nullable, required
    - `is_deleted` boolean, required
  - `updated_by` ReducedUserProfile, required
    - `user_id` string, required
    - `first_name` string, required
    - `last_name` string, required
    - `email` string, required
    - `avatar_url` string, nullable, required
    - `is_deleted` boolean, required
  - `icon` StaticAsset — Represents a static asset like an image or a file.
    - `url` string, nullable
    - `file_path` string, path, nullable
  - `icon_darkmode_variant` StaticAsset — Represents a static asset like an image or a file.
    - `url` string, nullable
    - `file_path` string, path, nullable

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/rebolt/apis/fastapi.md) · [All operations](https://skmtc.dev/rebolt/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/rebolt/fastapi/revisions/ee5884f323f3/schema)
