Skip to content

Latest commit

 

History

History
483 lines (400 loc) · 12.6 KB

assigning-credentials-to-users.md

File metadata and controls

483 lines (400 loc) · 12.6 KB

Assigning Credentials to Users

This guide explains how to assign and unassign credentials to users. When credentials are assigned, users can use them to access areas and resources according to their permissions. When credentials are unassigned, users can no longer use those specific credentials to access areas or resources.


Assign a Credential to a User

To assign a credential to a user, provide both the user ID (acs_user_id) and the credential ID (acs_credential_id).

{% tabs %} {% tab title="Python" %} Request:

seam.acs.credentials.assign(
  acs_user_id="33333333-3333-3333-3333-333333333333",
  acs_credential_id="66666666-6666-6666-6666-666666666666"
)

Response:

{% hint style="info" %} This response contains manufacturer-specific metadata that may vary by manufacturer. {% endhint %}

AcsCredential(
  acs_credential_id='99999999-9999-9999-9999-999999999999',
  acs_user_id='33333333-3333-3333-3333-333333333333',
  display_name='Multi Phone Sync Credential',
  code=null,
  acs_system_id='11111111-1111-1111-1111-111111111111',
  access_method='mobile_key',
  workspace_id='00000000-0000-0000-0000-000000000000',
  created_at='2024-04-12T03:56:22.396Z',
  is_multi_phone_sync_credential=True,
  # manufacturer-specific metadata
)

{% endtab %}

{% tab title="cURL (bash)" %} Request:

curl -X 'POST' \
  'https://connect.getseam.com/acs/credentials/assign' \
  -H "Authorization: Bearer ${API_KEY}" \
  -H 'Content-Type: application/json' \
  -d '{
  "acs_user_id": "33333333-3333-3333-3333-333333333333",
  "acs_credential_id": "66666666-6666-6666-6666-666666666666"
}'

Response:

{% hint style="info" %} This response contains manufacturer-specific metadata that may vary by manufacturer. {% endhint %}

{
  "acs_credential": {
    "acs_credential_id": "99999999-9999-9999-9999-999999999999",
    "acs_user_id": "33333333-3333-3333-3333-333333333333",
    "display_name": "Multi Phone Sync Credential",
    "code": null,
    "acs_system_id": "11111111-1111-1111-1111-111111111111",
    "access_method": "mobile_key",
    "workspace_id": "00000000-0000-0000-0000-000000000000",
    "created_at": "2024-04-12T03:56:22.396Z",
    "is_multi_phone_sync_credential": true,
    # manufacturer-specific metadata
  },
  "ok": true
}

{% endtab %}

{% tab title="JavaScript" %} Request:

await seam.acs.credentials.assign({
  acs_user_id: "33333333-3333-3333-3333-333333333333",
  acs_credential_id: "66666666-6666-6666-6666-666666666666"
});

Response:

{% hint style="info" %} This response contains manufacturer-specific metadata that may vary by manufacturer. {% endhint %}

{
  acs_credential_id: '99999999-9999-9999-9999-999999999999',
  acs_user_id: '33333333-3333-3333-3333-333333333333',
  display_name: 'Multi Phone Sync Credential',
  code: null,
  acs_system_id: '11111111-1111-1111-1111-111111111111',
  access_method: 'mobile_key',
  workspace_id: '00000000-0000-0000-0000-000000000000',
  created_at: '2024-04-12T03:56:22.396Z',
  is_multi_phone_sync_credential: true,
  // manufacturer-specific metadata
}

{% endtab %}

{% tab title="Ruby" %} Request:

# Coming soon!

Response:

# Coming soon!

{% endtab %}

{% tab title="PHP" %} Request:

$seam->acs->credentials->assign(
  acs_user_id: "33333333-3333-3333-3333-333333333333",
  acs_credential_id: "66666666-6666-6666-6666-66666666"
);

Response:

{% hint style="info" %} This response contains manufacturer-specific metadata that may vary by manufacturer. {% endhint %}

{
  "acs_credential_id": "99999999-9999-9999-9999-999999999999",
  "acs_user_id": "33333333-3333-3333-3333-333333333333",
  "display_name": "Multi Phone Sync Credential",
  "code": null,
  "acs_system_id": "11111111-1111-1111-1111-111111111111",
  "access_method": "mobile_key",
  "workspace_id": "00000000-0000-0000-0000-000000000000",
  "created_at": "2024-04-12T03:56:22.396Z",
  "is_multi_phone_sync_credential": true,
  // manufacturer-specific metadata
}

{% endtab %}

{% tab title="C#" %} Request:

seam.CredentialsAcs.Assign(
  acsUserId: "33333333-3333-3333-3333-333333333333",
  acsCredentialId: "66666666-6666-6666-6666-66666666"
);

Response:

{% hint style="info" %} This response contains manufacturer-specific metadata that may vary by manufacturer. {% endhint %}

{
  "acs_credential_id": "99999999-9999-9999-9999-999999999999",
  "acs_user_id": "33333333-3333-3333-3333-333333333333",
  "display_name": "Multi Phone Sync Credential",
  "code": null,
  "acs_system_id": "11111111-1111-1111-1111-111111111111",
  "access_method": "mobile_key",
  "workspace_id": "00000000-0000-0000-0000-000000000000",
  "created_at": "2024-04-12T03:56:22.396Z",
  "is_multi_phone_sync_credential": true,
  // manufacturer-specific metadata
}

{% endtab %}

{% tab title="Java" %} Request:

// Coming soon!

Response:

// Coming soon!

{% endtab %}

{% tab title="Go" %} Request:

acs_credential, uErr := client.Acs.Credentials.Assign(
  context.Background(), &acs.CredentialsAssignRequest{
    AcsUserId: "33333333-3333-3333-3333-333333333333",
    AcsCredentialId: "66666666-6666-6666-6666-66666666",
  },
)

Response:

{% hint style="info" %} This response contains manufacturer-specific metadata that may vary by manufacturer. {% endhint %}

{
  "acs_credential": {
    "acs_credential_id": "99999999-9999-9999-9999-999999999999",
    "acs_user_id": "33333333-3333-3333-3333-333333333333",
    "display_name": "Multi Phone Sync Credential",
    "code": null,
    "acs_system_id": "11111111-1111-1111-1111-111111111111",
    "access_method": "mobile_key",
    "workspace_id": "00000000-0000-0000-0000-000000000000",
    "created_at": "2024-04-12T03:56:22.396Z",
    "is_multi_phone_sync_credential": true,
    # manufacturer-specific metadata
  },
  "ok": true
}

{% endtab %} {% endtabs %}


Unassign a Credential from a User

To unassign a credential from a user, provide both the user ID (acs_user_id) and the credential ID (acs_credential_id).

{% tabs %} {% tab title="Python" %} Request:

seam.acs.credentials.unassign(
  acs_user_id="33333333-3333-3333-3333-333333333333",
  acs_credential_id="66666666-6666-6666-6666-666666666666"
)

Response:

{% hint style="info" %} This response contains manufacturer-specific metadata that may vary by manufacturer. {% endhint %}

AcsCredential(
  acs_credential_id='99999999-9999-9999-9999-999999999999',
  acs_user_id='33333333-3333-3333-3333-333333333333',
  display_name='Multi Phone Sync Credential',
  code=null,
  acs_system_id='11111111-1111-1111-1111-111111111111',
  access_method='mobile_key',
  workspace_id='00000000-0000-0000-0000-000000000000',
  created_at='2024-04-12T03:56:22.396Z',
  is_multi_phone_sync_credential=True,
  # manufacturer-specific metadata
)

{% endtab %}

{% tab title="cURL (bash)" %} Request:

curl -X 'POST' \
  'https://connect.getseam.com/acs/credentials/unassign' \
  -H "Authorization: Bearer ${API_KEY}" \
  -H 'Content-Type: application/json' \
  -d '{
  "acs_user_id": "33333333-3333-3333-3333-333333333333",
  "acs_credential_id": "66666666-6666-6666-6666-666666666666"
}'

Response:

{% hint style="info" %} This response contains manufacturer-specific metadata that may vary by manufacturer. {% endhint %}

{
  "acs_credential": {
    "acs_credential_id": "99999999-9999-9999-9999-999999999999",
    "acs_user_id": "33333333-3333-3333-3333-333333333333",
    "display_name": "Multi Phone Sync Credential",
    "code": null,
    "acs_system_id": "11111111-1111-1111-1111-111111111111",
    "access_method": "mobile_key",
    "workspace_id": "00000000-0000-0000-0000-000000000000",
    "created_at": "2024-04-12T03:56:22.396Z",
    "is_multi_phone_sync_credential": true,
    # manufacturer-specific metadata
  },
  "ok": true
}

{% endtab %}

{% tab title="JavaScript" %} Request:

await seam.acs.credentials.unassign({
  acs_user_id: "33333333-3333-3333-3333-333333333333",
  acs_credential_id: "66666666-6666-6666-6666-666666666666"
});

Response:

{% hint style="info" %} This response contains manufacturer-specific metadata that may vary by manufacturer. {% endhint %}

{
  acs_credential_id: '99999999-9999-9999-9999-999999999999',
  acs_user_id: '33333333-3333-3333-3333-333333333333',
  display_name: 'Multi Phone Sync Credential',
  code: null,
  acs_system_id: '11111111-1111-1111-1111-111111111111',
  access_method: 'mobile_key',
  workspace_id: '00000000-0000-0000-0000-000000000000',
  created_at: '2024-04-12T03:56:22.396Z',
  is_multi_phone_sync_credential: true,
  // manufacturer-specific metadata
}

{% endtab %}

{% tab title="Ruby" %} Request:

# Coming soon!

Response:

# Coming soon!

{% endtab %}

{% tab title="PHP" %} Request:

$seam->acs->credentials->unassign(
  acs_user_id: "33333333-3333-3333-3333-333333333333",
  acs_credential_id: "66666666-6666-6666-6666-66666666"
);

Response:

{% hint style="info" %} This response contains manufacturer-specific metadata that may vary by manufacturer. {% endhint %}

{
  "acs_credential_id": "99999999-9999-9999-9999-999999999999",
  "acs_user_id": "33333333-3333-3333-3333-333333333333",
  "display_name": "Multi Phone Sync Credential",
  "code": null,
  "acs_system_id": "11111111-1111-1111-1111-111111111111",
  "access_method": "mobile_key",
  "workspace_id": "00000000-0000-0000-0000-000000000000",
  "created_at": "2024-04-12T03:56:22.396Z",
  "is_multi_phone_sync_credential": true,
  // manufacturer-specific metadata
}

{% endtab %}

{% tab title="C#" %} Request:

seam.CredentialsAcs.Unassign(
  acsUserId: "33333333-3333-3333-3333-333333333333",
  acsCredentialId: "66666666-6666-6666-6666-66666666"
);

Response:

{% hint style="info" %} This response contains manufacturer-specific metadata that may vary by manufacturer. {% endhint %}

{
  "acs_credential_id": "99999999-9999-9999-9999-999999999999",
  "acs_user_id": "33333333-3333-3333-3333-333333333333",
  "display_name": "Multi Phone Sync Credential",
  "code": null,
  "acs_system_id": "11111111-1111-1111-1111-111111111111",
  "access_method": "mobile_key",
  "workspace_id": "00000000-0000-0000-0000-000000000000",
  "created_at": "2024-04-12T03:56:22.396Z",
  "is_multi_phone_sync_credential": true,
  // manufacturer-specific metadata
}

{% endtab %}

{% tab title="Java" %} Request:

// Coming soon!

Response:

// Coming soon!

{% endtab %}

{% tab title="Go" %} Request:

acs_credential, uErr := client.Acs.Credentials.Unassign(
  context.Background(), &acs.CredentialsUnassignRequest{
    AcsUserId: "33333333-3333-3333-3333-333333333333",
    AcsCredentialId: "66666666-6666-6666-6666-66666666",
  },
)

Response:

{% hint style="info" %} This response contains manufacturer-specific metadata that may vary by manufacturer. {% endhint %}

{
  "acs_credential": {
    "acs_credential_id": "99999999-9999-9999-9999-999999999999",
    "acs_user_id": "33333333-3333-3333-3333-333333333333",
    "display_name": "Multi Phone Sync Credential",
    "code": null,
    "acs_system_id": "11111111-1111-1111-1111-111111111111",
    "access_method": "mobile_key",
    "workspace_id": "00000000-0000-0000-0000-000000000000",
    "created_at": "2024-04-12T03:56:22.396Z",
    "is_multi_phone_sync_credential": true,
    # manufacturer-specific metadata
  },
  "ok": true
}

{% endtab %} {% endtabs %}