POST
/
apps
/
{app_id}
/
custom_credentials
Create a Custom Credential
curl --request POST \
  --url http://localhost:3001/portal-api/apps/{app_id}/custom_credentials \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "Alias": "<string>",
  "Type": "CREDENTIAL_TYPE_TYK_MANAGED",
  "PlanID": 123,
  "AuthenticationMethod": "<string>",
  "ProductIDs": [
    123
  ],
  "AuthTokenType": "AUTH_TOKEN_CUSTOM",
  "KeyID": "<string>",
  "CredentialKey": "<string>",
  "CredentialSecret": "<string>",
  "ProviderID": 123,
  "ClientTypeID": 123
}'
{
  "ID": 123,
  "Alias": "<string>",
  "Type": "CREDENTIAL_TYPE_TYK_MANAGED",
  "PlanID": "<string>",
  "AuthenticationMethod": "<string>",
  "ProductIDs": [
    123
  ],
  "AuthTokenType": "AUTH_TOKEN_CUSTOM",
  "KeyID": "<string>",
  "ProviderID": 123,
  "ClientTypeID": 123,
  "CreatedAt": "2023-06-25 13:37",
  "UpdatedAt": "2023-06-25 13:37"
}

Authorizations

Authorization
string
header
required

Path Parameters

app_id
string
required

The ID of the application.

Body

application/json
Alias
string

Alias for the custom credential

Type
enum<string>

Type of the custom credential

Available options:
CREDENTIAL_TYPE_TYK_MANAGED,
CREDENTIAL_TYPE_CUSTOM
PlanID
integer

Plan ID associated with the custom credential

AuthenticationMethod
string

Authentication method used for the custom credential

ProductIDs
integer[]

List of product IDs associated with the custom credential

AuthTokenType
enum<string>

Type of authentication token used

Available options:
AUTH_TOKEN_CUSTOM,
AUTH_TOKEN_STANDARD
KeyID
string

Key ID for the custom credential

CredentialKey
string

Key for the custom credential

CredentialSecret
string

Secret for the custom credential

ProviderID
integer

ID for OAuth2.0 provider

ClientTypeID
integer

ID for OAuth2.0 client type

Response

Custom credential created successfully

ID
integer

Unique identifier for the custom credential

Alias
string

Alias for the custom credential

Type
enum<string>

Type of the custom credential

Available options:
CREDENTIAL_TYPE_TYK_MANAGED,
CREDENTIAL_TYPE_CUSTOM
PlanID
string

Plan ID associated with the custom credential

AuthenticationMethod
string

Authentication method used for the custom credential

ProductIDs
integer[]

List of product IDs associated with the custom credential

AuthTokenType
enum<string>

Type of authentication token used

Available options:
AUTH_TOKEN_CUSTOM,
AUTH_TOKEN_STANDARD
KeyID
string

Key ID for the custom credential

ProviderID
integer

ID for OAuth2.0 provider

ClientTypeID
integer

ID for OAuth2.0 client type

CreatedAt
string

Timestamp of when this webhook was created

Example:

"2023-06-25 13:37"

UpdatedAt
string

Timestamp of when this webhook was updated the last time

Example:

"2023-06-25 13:37"