Create Server-Signed Application

POST /auth/apps

Create a new Server-Signed application in the caller's org. This is only required when you must add additional authentication to the request from the server side. We strongly recommend creating a default application unless you have an explicit need for server authentication as this adds additional complexity to the configuration.

Required Permissions

NameConditions

Auth:Apps:Create

Always Required

Auth:Types:Application

Always Required

Request Body

name *

String

the name of the application, must be unique within the caller's org

relyingPartyId *

String

the top level domain where the application will be hosted, for example: dfns.io

origin *

String

the url of the application, for example: https://api.dfns.io

kind *

String

the kind of application being created, must be ServerSideApplication

publicKey *

String

the public key that can be used to validate signatures generated by the application

daysValid

Integer

Optional number of days the application's token will be valid. Default is 730. Max is 730

permissionId

String

Optional ID of the permission that will be assigned to the application. If no permission ID is given, the application will be assigned the same permissions as the caller

externalId

String

Optional user defined value that can be used to correlate the entity with an external system

Example

{
  "name": "MyApp Production",
  "relyingPartyId": "https://myapp.example.co",
  "origin": "example.co",
  "kind": "ServerSideApplication",
  "permissionId": "pm-delaw-avoca-v16r37fpp8koqebc",
  "daysValid": 720,
  "publicKey": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4juWLl9qYQRlkj0XGsSx\naQGe0hjOiXOMRHQpUWGWu/kM6rdiLbsHN+muXHl/kmFu8Hd+eTzPNVgfGREobvgI\nv/jIf2edTcOLGCNY9DDjxuezilKAzvxnckAg1RkaQuDoWBjtECl/QFwZbskE4Vy3\nMP6b5ynTZzIcdkQ443GPzylcZc3bu7hVsUKTSpI1jioVPOMcc4+ntgVMA42nhzuo\n1sMcU6sDQuBE4PCCuZXvcupBwPrOQDwLgNcvIZihn4OrHCAVWQpedruIKB6pmpRF\nfBOrs1Gco2nE85ABpC3LxMu5NahyotA5S4pxqo97Pf+FMCVOeZxUpDBvsS5bSCg+\nDwIDAQAB\n-----END PUBLIC KEY-----"
}

Responses

Success - The newly created application

{
  "appId": "ap-4s6se-e2t7n-89gfg50iaos73pm6",
  "kind": "ServerSideApplication",
  "orgId": "or-yanke-mars-6ulofamogg8fs87v",
  "expectedRpId": "localhost",
  "name": "Localhost Server-Side App",
  "isActive": true,
  "expectedOrigin": "http://localhost:3000",
  "permissionAssignments": [],
  "accessTokens": [
    {
      "accessToken": "eyJ0eXAi...pm4Rq5mCmlC5GcoHpA",
      "dateCreated": "2023-04-11T16:38:55.098Z",
      "credId": "Y2ktMmNkcXMscDl5cjktOXBvYnB1bWo4anZnY2h2bA",
      "isActive": true,
      "kind": "Application",
      "linkedUserId": "",
      "linkedAppId": "ap-4s6se-e2t7n-89gfg50iaos73pm6",
      "name": "Localhost Server-Side App",
      "orgId": "or-yanke-mars-6ulofamogg8fs87v",
      "permissionAssignments": [],
      "publicKey": "SHA256:lH6mAX/74SbWzSjwNBFapwJsUdccVQzA8yj7K8/R5eo",
      "tokenId": "to-3oona-vc575-9ueb17f2t4uq0m9b"
    }
  ]
}

Last updated