DC 6.0 Getting an Access Key

Access keys allow you to access the Digizuite API.

 

Icon legend

This parameter is required

Deprecated

URL: /digizuitecore/loginservice/api/access-key

Method: POST

Auth required: NO

Request properties

Name

Example

Description

Name

Example

Description

username

lightuser

The username of the member to authenticate with. The field is case-insensitive

password

test

The password of the user to authenticate with. The field is case-sensitive.

The value can also be MD5 encoded if passwordEncoding is set to Md5.

passwordEncoding

Plaintext or Md5

How the passed password is encoded. Prefer Plaintext if possible. Md5 exists mainly for backward compatibility, and will be removed at some point in the future.

The password is always stored securely in the database, no matter the encoding passed here.

options

{ "configId": "/0/", "languageId": 3, "persistLanguage": false, "duration": "7.00:00:00" }

Additional options to customize the created access key. It can be left out entirely.

options.configId

/0/

If you want to use a specific config id. This mainly required if you are working with Search2 that are not defined in the DAM product.

options.languageId

3

The id of the language to authorize with.

 

If not specified, the access key will be created in the default language for that user.

options.persistLanguage

true or false

If the users default language should be changed to the specified options.languageId going forward.

options.duration

7.00:00:00 (7 days)

 

or 00:15:00 (15 minutes)

A C# TimeSpan formatted string to override how long this access key should be valid for. If not specified the access key will follow the system configured default.

In general it is not recommended to specify this, and instead integration should prefer to support automatic refreshing of access keys by looking at the expiration value in the response.

This option has been removed entirely in 5.8.1.

 

Response properties

Name

Example

Description

Name

Example

Description

token

MIICXQI...xf5f0kLx

The actual access to use for authorizing future requests.

The value is an opaque string and should not be interpreted as the specified format might change.

This is the only time this is returned and there is not way to get it again if lost.

id

43505

A numeric id for this access key. Can be used to get information about this access key, such as which user it is authorizing.

publicKey

MIGJA...AAE=

A public key generated from the token.

expiration

2023-07-11T05:12:48.2628119+00:00

A timestamp for when this key will stop working.

member

 

Information about the user this key is authorizing, such as who they are and what their roles are.

languageId

3

The id of the language this access key is authorized with.

configVersionId

/0/

The config version this access key is using if hitting Search2.

firstVersion

false

If the access key uses the specified configVersionId only when looking for implementation of searches (true) or if Search2 can look in child config versions (false).

Minimal example request

POST https://<my-dam>/digizuitecore/loginservice/api/access-key Content-Type: application/json { "username": "lightuser", "password": "test", "passwordEncoding": "Plaintext" }

 

Full example request

POST https://<my-dam>/digizuitecore/loginservice/api/access-key Content-Type: application/json { "username": "lightuser", "password": "test", "passwordEncoding": "Plaintext", "options": { "configId": "/0/", "languageId": 3, "persistLanguage": false, "duration": "7.00:00:00" } }

 

For both of the requests, the response looks like this:

{ "token": "<redacted>", "id": 43505, "publicKey": "<redacted>", "expiration": "2023-07-11T05:12:48.2628119+00:00", "member": { "memberId": 30010, "itemId": 8364, "itemGuid": "78adf9fb-9ac4-48e4-840a-d34deea3a5d7", "username": "LightUser", "email": null, "firstName": "Light user", "lastName": "(user profile)", "groups": [ { "groupId": 24, "itemId": 8359, "itemGuid": "ea2b32ef-cd90-41c8-93ac-d026881b6c12", "groupName": "Light user (profile)", "downloadQualities": [] } // Other groups omited for brevity ], "roles": [ { "roleId": 80, "constant": "MediaPortal_User", "name": "MediaPortal User", "description": null, "inherited": false } // Other roles omitted for brevity ] }, "languageId": 3, "configVersionId": "/0/", "firstVersion": false, "memberId": 30010 }