Create OAuth client

Creates a new OAuth client configuration for the Tenant by specifying redirect URIs, scopes, and other necessary settings to enable OAuth authentication and authorization.

POST
/v2/manage/oauth-clients

Creates a new OAuth client configuration for the Tenant by specifying redirect URIs, scopes, and other necessary settings to enable OAuth authentication and authorization.

Authorization

M2MBearerToken
AuthorizationBearer <token>

M2M Token for authentication

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://api.loginradius.com/v2/manage/oauth-clients" \  -H "Content-Type: application/json" \  -d '{    "AppName": "string",    "Protocol": "OAuth 2.0"  }'
{
  "AllowedCorsOrigin": [
    "https://example.com"
  ],
  "AllowedScopes": [
    "openid",
    "profile",
    "email"
  ],
  "AllowedWebOrigin": [
    "https://example.com"
  ],
  "AppId": 123456,
  "AppName": "MyApp",
  "ApplicationType": "Web",
  "AudienceScopes": {
    "property1": [
      "openid",
      "profile",
      "email"
    ],
    "property2": [
      "openid",
      "profile",
      "email"
    ]
  },
  "BackChannelLogout": {
    "IsEnabled": true,
    "LogoutInitiator": {
      "Mode": "RPInitiated",
      "Intiators": {
        "RPLogout": true,
        "IDPLogout": true,
        "PasswordChange": true,
        "AccountDelete": true
      }
    },
    "LogoutTokenTTL": 3600,
    "LogoutURIs": [
      "https://example.com/logout"
    ]
  },
  "ClientId": "123e4567-e89b-12d3-a456-426614174000",
  "ClientSecret": "exampleSecret",
  "Connections": {
    "Enabled": true,
    "PasswordlessLogin": {
      "Enabled": true,
      "Email": true,
      "SMS": true
    },
    "TraditionalLogin": true,
    "SocialLogins": [
      {
        "IsEnabled": true,
        "ProviderName": "Google"
      }
    ],
    "CustomIdp": [
      {
        "IsEnabled": true,
        "ProviderName": "Google"
      }
    ],
    "Enterprise": [
      {
        "IsEnabled": true,
        "ProviderName": "Google"
      }
    ]
  },
  "CreatedDate": "2023-10-01T12:00:00Z",
  "DeviceCodeConfig": {
    "AfterVerificationUrl": "https://example.com/after-verification",
    "DeviceCodeExpire": 300,
    "PollingInterval": 5,
    "UserCodeCharacterSet": "Base20",
    "UserCodeMask": "6",
    "VerificationUrl": "https://example.com/verification"
  },
  "EnableCorsOrigin": true,
  "ForceReAuthentication": true,
  "GlobalClient": true,
  "GrantTypes": [
    "authorization_code",
    "client_credentials"
  ],
  "IdTokenAudiences": [
    "example-audience"
  ],
  "JwtTokenConfig": {
    "Algorithm": "RS256",
    "IdTokenTTL": 3600,
    "TokenTTL": 3600
  },
  "LastModifiedDate": "2023-10-01T12:00:00Z",
  "LoginUrl": "https://example.com/login",
  "LoginRedirectUri": [
    "https://example.com/login"
  ],
  "LogoutRedirectUri": [
    "https://example.com/logout"
  ],
  "AccessTokenMappingTemplate": "{\"email\": \"{{Email.0.Value}}\"}",
  "IdTokenMappingTemplate": "{\"email\": \"{{Email.0.Value}}\"}",
  "Mapping": {
    "property1": "string",
    "property2": "string"
  },
  "Metadata": {
    "key1": "value1",
    "key2": "value2"
  },
  "Protocol": "OAuth2",
  "RedirectURIExactMatch": true,
  "RefreshTokenTTL": 3600,
  "Secret": "exampleSecret",
  "SignedUserInfo": true,
  "TokenAuthMethod": "client_secret_basic",
  "TokenWebOriginMatch": true
}

{
  "ErrorCode": 7914,
  "Message": "Post body is invalid",
  "Description": "Please use a valid post body in JSON format."
}

{
  "Message": "Access Unauthorized",
  "Description": "Access Unauthorized, please use valid authorization to access this endpoint.",
  "ErrorCode": 6002
}
{
  "Description": "OAuth configuration already exist for this site, Please use a unique name in order to process this request.",
  "ErrorCode": 7982,
  "Message": "A OAuth config already exist"
}
{
  "Message": "Operation failed due to an internal error.",
  "Description": "An unknown internal error occurred, please try again in a few minutes or contact your system administrator.",
  "ErrorCode": 7909
}