Providers
Retrieve details of a specific OAuth provider by slug.
The slug of the resource.
obj_slug
Provider details.
The given resource or object was not found or does not exist.
GET /api/v1/oauth/{slug}/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Accept: */*
{
"name": "text",
"slug": "text",
"icon": "https://example.com",
"client_id": "text",
"client_secret": "text",
"authorization_url": "https://example.com",
"token_url": "https://example.com",
"userinfo_url": "https://example.com",
"whitelist": [
"https://example.com"
],
"provider": "azure",
"kwargs": {},
"is_active": true
}
Update the details of an existing OAuth provider. Only superusers can perform this action.
The slug of the resource.
obj_slug
The name of the OAuth provider.
A unique slug identifier for the provider.
URL of the provider's icon.
Client ID for the OAuth provider.
Client secret for the OAuth provider.
The URL for the authorization endpoint of the provider.
The URL for the token endpoint of the provider.
The URL for the user information endpoint of the provider.
A list of URLs whitelisted for the provider.
The type of provider. Possible values: azure
, github
, google
, turkcell
.
Additional parameters for the provider.
Indicates whether the provider is active.
Provider updated successfully.
Required field(s) are missing, data is invalid, or the action is not allowed.
Forbidden
PUT /api/v1/oauth/{slug}/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 297
{
"name": "text",
"slug": "text",
"icon": "https://example.com",
"client_id": "text",
"client_secret": "text",
"authorization_url": "https://example.com",
"token_url": "https://example.com",
"userinfo_url": "https://example.com",
"whitelist": [
"https://example.com"
],
"provider": "azure",
"kwargs": {},
"is_active": true
}
{
"name": "text",
"slug": "text",
"icon": "https://example.com",
"client_id": "text",
"client_secret": "text",
"authorization_url": "https://example.com",
"token_url": "https://example.com",
"userinfo_url": "https://example.com",
"whitelist": [
"https://example.com"
],
"provider": "azure",
"kwargs": {},
"is_active": true
}
Delete an OAuth provider. Only superusers can perform this action.
The slug of the resource.
obj_slug
No content
No content
Forbidden
The given resource or object was not found or does not exist.
DELETE /api/v1/oauth/{slug}/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Accept: */*
No content
Retrieve a list of all OAuth providers. Non-superusers only see active providers.
A list of OAuth providers.
GET /api/v1/oauth/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Accept: */*
A list of OAuth providers.
[
{
"name": "text",
"slug": "text",
"icon": "https://example.com",
"client_id": "text",
"client_secret": "text",
"authorization_url": "https://example.com",
"token_url": "https://example.com",
"userinfo_url": "https://example.com",
"whitelist": [
"https://example.com"
],
"provider": "azure",
"kwargs": {},
"is_active": true
}
]
Create a new OAuth provider. Only superusers can perform this action.
The name of the OAuth provider.
A unique slug identifier for the provider.
URL of the provider's icon.
Client ID for the OAuth provider.
Client secret for the OAuth provider.
The URL for the authorization endpoint of the provider.
The URL for the token endpoint of the provider.
The URL for the user information endpoint of the provider.
A list of URLs whitelisted for the provider.
The type of provider. Possible values: azure
, github
, google
, turkcell
.
Additional parameters for the provider.
Indicates whether the provider is active.
Provider created successfully.
Required field(s) are missing, data is invalid, or the action is not allowed.
Forbidden
POST /api/v1/oauth/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 297
{
"name": "text",
"slug": "text",
"icon": "https://example.com",
"client_id": "text",
"client_secret": "text",
"authorization_url": "https://example.com",
"token_url": "https://example.com",
"userinfo_url": "https://example.com",
"whitelist": [
"https://example.com"
],
"provider": "azure",
"kwargs": {},
"is_active": true
}
{
"name": "text",
"slug": "text",
"icon": "https://example.com",
"client_id": "text",
"client_secret": "text",
"authorization_url": "https://example.com",
"token_url": "https://example.com",
"userinfo_url": "https://example.com",
"whitelist": [
"https://example.com"
],
"provider": "azure",
"kwargs": {},
"is_active": true
}
Was this helpful?