# Providers

## Retrieve a provider

> Retrieve details of a specific OAuth provider by slug.

```json
{"openapi":"3.0.3","info":{"title":"Omnitron API","version":"1.0.0"},"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"type":"apiKey","in":"header","name":"Authorization"}},"parameters":{"slug_path":{"name":"slug","in":"path","description":"The slug of the resource.","required":true,"schema":{"type":"string"}}},"schemas":{"Provider":{"type":"object","properties":{"name":{"type":"string","maxLength":256,"description":"The name of the OAuth provider."},"slug":{"type":"string","maxLength":256,"description":"A unique slug identifier for the provider."},"icon":{"type":"string","format":"uri","description":"URL of the provider's icon."},"client_id":{"type":"string","maxLength":256,"description":"Client ID for the OAuth provider."},"client_secret":{"type":"string","maxLength":512,"description":"Client secret for the OAuth provider."},"authorization_url":{"type":"string","format":"uri","maxLength":512,"description":"The URL for the authorization endpoint of the provider."},"token_url":{"type":"string","format":"uri","maxLength":512,"description":"The URL for the token endpoint of the provider."},"userinfo_url":{"type":"string","format":"uri","maxLength":512,"description":"The URL for the user information endpoint of the provider."},"whitelist":{"type":"array","items":{"type":"string","format":"uri","maxLength":512},"description":"A list of URLs whitelisted for the provider."},"provider":{"type":"string","maxLength":32,"enum":["azure","github","google","turkcell"],"description":"The type of provider. Possible values: `azure`, `github`, `google`, `turkcell`."},"kwargs":{"type":"object","description":"Additional parameters for the provider."},"is_active":{"type":"boolean","description":"Indicates whether the provider is active."}}}},"responses":{"404":{"description":"The given resource or object was not found or does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"description":"Contains a detailed description of the error.","type":"string"}}}}}}}},"paths":{"/api/v1/oauth/{slug}/":{"get":{"summary":"Retrieve a provider","description":"Retrieve details of a specific OAuth provider by slug.","tags":["Providers"],"parameters":[{"$ref":"#/components/parameters/slug_path"}],"responses":{"200":{"description":"Provider details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Provider"}}}},"404":{"$ref":"#/components/responses/404"}}}}}}
```

## Update a provider

> Update the details of an existing OAuth provider. Only superusers can perform this action.

```json
{"openapi":"3.0.3","info":{"title":"Omnitron API","version":"1.0.0"},"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"type":"apiKey","in":"header","name":"Authorization"}},"parameters":{"slug_path":{"name":"slug","in":"path","description":"The slug of the resource.","required":true,"schema":{"type":"string"}}},"schemas":{"Provider":{"type":"object","properties":{"name":{"type":"string","maxLength":256,"description":"The name of the OAuth provider."},"slug":{"type":"string","maxLength":256,"description":"A unique slug identifier for the provider."},"icon":{"type":"string","format":"uri","description":"URL of the provider's icon."},"client_id":{"type":"string","maxLength":256,"description":"Client ID for the OAuth provider."},"client_secret":{"type":"string","maxLength":512,"description":"Client secret for the OAuth provider."},"authorization_url":{"type":"string","format":"uri","maxLength":512,"description":"The URL for the authorization endpoint of the provider."},"token_url":{"type":"string","format":"uri","maxLength":512,"description":"The URL for the token endpoint of the provider."},"userinfo_url":{"type":"string","format":"uri","maxLength":512,"description":"The URL for the user information endpoint of the provider."},"whitelist":{"type":"array","items":{"type":"string","format":"uri","maxLength":512},"description":"A list of URLs whitelisted for the provider."},"provider":{"type":"string","maxLength":32,"enum":["azure","github","google","turkcell"],"description":"The type of provider. Possible values: `azure`, `github`, `google`, `turkcell`."},"kwargs":{"type":"object","description":"Additional parameters for the provider."},"is_active":{"type":"boolean","description":"Indicates whether the provider is active."}}}},"responses":{"400":{"description":"Required field(s) are missing, data is invalid, or the action is not allowed.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"field":{"oneOf":[{"type":"array","description":"Indicates that no value was provided for the {field} field in the request.","items":{"type":"string"}},{"type":"array","description":"Indicates usage of a non-existent object for {field} in the request.","items":{"type":"string"}}]},"code":{"type":"string","description":"Represents the server-side error code."}}},{"type":"object","properties":{"non_field_errors":{"description":"Indicates invalid data or action usage in the request.","type":"array","items":{"type":"string"}},"code":{"type":"string","description":"Represents the server-side error code."}}},{"type":"object","properties":{"detail":{"description":"Provides a detailed message for the given error.","type":"string"},"code":{"type":"string","description":"Represents the server-side error code."}}}]}}}},"403":{"description":"Forbidden"}}},"paths":{"/api/v1/oauth/{slug}/":{"put":{"summary":"Update a provider","description":"Update the details of an existing OAuth provider. Only superusers can perform this action.","tags":["Providers"],"parameters":[{"$ref":"#/components/parameters/slug_path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Provider"}}}},"responses":{"200":{"description":"Provider updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Provider"}}}},"400":{"$ref":"#/components/responses/400"},"403":{"$ref":"#/components/responses/403"}}}}}}
```

## Delete a provider

> Delete an OAuth provider. Only superusers can perform this action.

```json
{"openapi":"3.0.3","info":{"title":"Omnitron API","version":"1.0.0"},"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"type":"apiKey","in":"header","name":"Authorization"}},"parameters":{"slug_path":{"name":"slug","in":"path","description":"The slug of the resource.","required":true,"schema":{"type":"string"}}},"responses":{"204":{"description":"No content"},"403":{"description":"Forbidden"},"404":{"description":"The given resource or object was not found or does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"description":"Contains a detailed description of the error.","type":"string"}}}}}}}},"paths":{"/api/v1/oauth/{slug}/":{"delete":{"summary":"Delete a provider","description":"Delete an OAuth provider. Only superusers can perform this action.","tags":["Providers"],"parameters":[{"$ref":"#/components/parameters/slug_path"}],"responses":{"204":{"$ref":"#/components/responses/204"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"}}}}}}
```

## List all providers

> Retrieve a list of all OAuth providers. Non-superusers only see active providers.

```json
{"openapi":"3.0.3","info":{"title":"Omnitron API","version":"1.0.0"},"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"type":"apiKey","in":"header","name":"Authorization"}},"schemas":{"Provider":{"type":"object","properties":{"name":{"type":"string","maxLength":256,"description":"The name of the OAuth provider."},"slug":{"type":"string","maxLength":256,"description":"A unique slug identifier for the provider."},"icon":{"type":"string","format":"uri","description":"URL of the provider's icon."},"client_id":{"type":"string","maxLength":256,"description":"Client ID for the OAuth provider."},"client_secret":{"type":"string","maxLength":512,"description":"Client secret for the OAuth provider."},"authorization_url":{"type":"string","format":"uri","maxLength":512,"description":"The URL for the authorization endpoint of the provider."},"token_url":{"type":"string","format":"uri","maxLength":512,"description":"The URL for the token endpoint of the provider."},"userinfo_url":{"type":"string","format":"uri","maxLength":512,"description":"The URL for the user information endpoint of the provider."},"whitelist":{"type":"array","items":{"type":"string","format":"uri","maxLength":512},"description":"A list of URLs whitelisted for the provider."},"provider":{"type":"string","maxLength":32,"enum":["azure","github","google","turkcell"],"description":"The type of provider. Possible values: `azure`, `github`, `google`, `turkcell`."},"kwargs":{"type":"object","description":"Additional parameters for the provider."},"is_active":{"type":"boolean","description":"Indicates whether the provider is active."}}}}},"paths":{"/api/v1/oauth/":{"get":{"summary":"List all providers","description":"Retrieve a list of all OAuth providers. Non-superusers only see active providers.","tags":["Providers"],"responses":{"200":{"description":"A list of OAuth providers.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Provider"}}}}}}}}}}
```

## Create a new provider

> Create a new OAuth provider. Only superusers can perform this action.

```json
{"openapi":"3.0.3","info":{"title":"Omnitron API","version":"1.0.0"},"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"type":"apiKey","in":"header","name":"Authorization"}},"schemas":{"Provider":{"type":"object","properties":{"name":{"type":"string","maxLength":256,"description":"The name of the OAuth provider."},"slug":{"type":"string","maxLength":256,"description":"A unique slug identifier for the provider."},"icon":{"type":"string","format":"uri","description":"URL of the provider's icon."},"client_id":{"type":"string","maxLength":256,"description":"Client ID for the OAuth provider."},"client_secret":{"type":"string","maxLength":512,"description":"Client secret for the OAuth provider."},"authorization_url":{"type":"string","format":"uri","maxLength":512,"description":"The URL for the authorization endpoint of the provider."},"token_url":{"type":"string","format":"uri","maxLength":512,"description":"The URL for the token endpoint of the provider."},"userinfo_url":{"type":"string","format":"uri","maxLength":512,"description":"The URL for the user information endpoint of the provider."},"whitelist":{"type":"array","items":{"type":"string","format":"uri","maxLength":512},"description":"A list of URLs whitelisted for the provider."},"provider":{"type":"string","maxLength":32,"enum":["azure","github","google","turkcell"],"description":"The type of provider. Possible values: `azure`, `github`, `google`, `turkcell`."},"kwargs":{"type":"object","description":"Additional parameters for the provider."},"is_active":{"type":"boolean","description":"Indicates whether the provider is active."}}}},"responses":{"400":{"description":"Required field(s) are missing, data is invalid, or the action is not allowed.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"field":{"oneOf":[{"type":"array","description":"Indicates that no value was provided for the {field} field in the request.","items":{"type":"string"}},{"type":"array","description":"Indicates usage of a non-existent object for {field} in the request.","items":{"type":"string"}}]},"code":{"type":"string","description":"Represents the server-side error code."}}},{"type":"object","properties":{"non_field_errors":{"description":"Indicates invalid data or action usage in the request.","type":"array","items":{"type":"string"}},"code":{"type":"string","description":"Represents the server-side error code."}}},{"type":"object","properties":{"detail":{"description":"Provides a detailed message for the given error.","type":"string"},"code":{"type":"string","description":"Represents the server-side error code."}}}]}}}},"403":{"description":"Forbidden"}}},"paths":{"/api/v1/oauth/":{"post":{"summary":"Create a new provider","description":"Create a new OAuth provider. Only superusers can perform this action.","tags":["Providers"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Provider"}}}},"responses":{"201":{"description":"Provider created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Provider"}}}},"400":{"$ref":"#/components/responses/400"},"403":{"$ref":"#/components/responses/403"}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://apidocs.akinon.com/omnitron-openapis/providers.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
