12 KiB
generated.immich.openapi_client.OAuthApi
All URIs are relative to https://github.com/api
| Method | HTTP request | Description |
|---|---|---|
| finish_o_auth | POST /oauth/callback | |
| link_o_auth_account | POST /oauth/link | |
| redirect_o_auth_to_mobile | GET /oauth/mobile-redirect | |
| start_o_auth | POST /oauth/authorize | |
| unlink_o_auth_account | POST /oauth/unlink |
finish_o_auth
LoginResponseDto finish_o_auth(o_auth_callback_dto)
Example
import generated.immich.openapi_client
from generated.immich.openapi_client.models.login_response_dto import LoginResponseDto
from generated.immich.openapi_client.models.o_auth_callback_dto import OAuthCallbackDto
from generated.immich.openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://github.com/api
# See configuration.py for a list of all supported configuration parameters.
configuration = generated.immich.openapi_client.Configuration(
host = "https://github.com/api"
)
# Enter a context with an instance of the API client
with generated.immich.openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = generated.immich.openapi_client.OAuthApi(api_client)
o_auth_callback_dto = generated.immich.openapi_client.OAuthCallbackDto() # OAuthCallbackDto |
try:
api_response = api_instance.finish_o_auth(o_auth_callback_dto)
print("The response of OAuthApi->finish_o_auth:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling OAuthApi->finish_o_auth: %s\n" % e)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| o_auth_callback_dto | OAuthCallbackDto |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: application/json
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 201 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
link_o_auth_account
UserAdminResponseDto link_o_auth_account(o_auth_callback_dto)
Example
- Api Key Authentication (cookie):
- Api Key Authentication (api_key):
- Bearer (JWT) Authentication (bearer):
import generated.immich.openapi_client
from generated.immich.openapi_client.models.o_auth_callback_dto import OAuthCallbackDto
from generated.immich.openapi_client.models.user_admin_response_dto import UserAdminResponseDto
from generated.immich.openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://github.com/api
# See configuration.py for a list of all supported configuration parameters.
configuration = generated.immich.openapi_client.Configuration(
host = "https://github.com/api"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: cookie
configuration.api_key['cookie'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookie'] = 'Bearer'
# Configure API key authorization: api_key
configuration.api_key['api_key'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_key'] = 'Bearer'
# Configure Bearer authorization (JWT): bearer
configuration = generated.immich.openapi_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with generated.immich.openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = generated.immich.openapi_client.OAuthApi(api_client)
o_auth_callback_dto = generated.immich.openapi_client.OAuthCallbackDto() # OAuthCallbackDto |
try:
api_response = api_instance.link_o_auth_account(o_auth_callback_dto)
print("The response of OAuthApi->link_o_auth_account:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling OAuthApi->link_o_auth_account: %s\n" % e)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| o_auth_callback_dto | OAuthCallbackDto |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 201 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
redirect_o_auth_to_mobile
redirect_o_auth_to_mobile()
Example
import generated.immich.openapi_client
from generated.immich.openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://github.com/api
# See configuration.py for a list of all supported configuration parameters.
configuration = generated.immich.openapi_client.Configuration(
host = "https://github.com/api"
)
# Enter a context with an instance of the API client
with generated.immich.openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = generated.immich.openapi_client.OAuthApi(api_client)
try:
api_instance.redirect_o_auth_to_mobile()
except Exception as e:
print("Exception when calling OAuthApi->redirect_o_auth_to_mobile: %s\n" % e)
Parameters
This endpoint does not need any parameter.
Return type
void (empty response body)
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
start_o_auth
OAuthAuthorizeResponseDto start_o_auth(o_auth_config_dto)
Example
import generated.immich.openapi_client
from generated.immich.openapi_client.models.o_auth_authorize_response_dto import OAuthAuthorizeResponseDto
from generated.immich.openapi_client.models.o_auth_config_dto import OAuthConfigDto
from generated.immich.openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://github.com/api
# See configuration.py for a list of all supported configuration parameters.
configuration = generated.immich.openapi_client.Configuration(
host = "https://github.com/api"
)
# Enter a context with an instance of the API client
with generated.immich.openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = generated.immich.openapi_client.OAuthApi(api_client)
o_auth_config_dto = generated.immich.openapi_client.OAuthConfigDto() # OAuthConfigDto |
try:
api_response = api_instance.start_o_auth(o_auth_config_dto)
print("The response of OAuthApi->start_o_auth:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling OAuthApi->start_o_auth: %s\n" % e)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| o_auth_config_dto | OAuthConfigDto |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: application/json
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 201 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
unlink_o_auth_account
UserAdminResponseDto unlink_o_auth_account()
Example
- Api Key Authentication (cookie):
- Api Key Authentication (api_key):
- Bearer (JWT) Authentication (bearer):
import generated.immich.openapi_client
from generated.immich.openapi_client.models.user_admin_response_dto import UserAdminResponseDto
from generated.immich.openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://github.com/api
# See configuration.py for a list of all supported configuration parameters.
configuration = generated.immich.openapi_client.Configuration(
host = "https://github.com/api"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: cookie
configuration.api_key['cookie'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookie'] = 'Bearer'
# Configure API key authorization: api_key
configuration.api_key['api_key'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_key'] = 'Bearer'
# Configure Bearer authorization (JWT): bearer
configuration = generated.immich.openapi_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with generated.immich.openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = generated.immich.openapi_client.OAuthApi(api_client)
try:
api_response = api_instance.unlink_o_auth_account()
print("The response of OAuthApi->unlink_o_auth_account:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling OAuthApi->unlink_o_auth_account: %s\n" % e)
Parameters
This endpoint does not need any parameter.
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]