Passer au contenu principal
POST
https://{tenantDomain}/api/v2
/
connections
/
{id}
/
scim-configuration
/
tokens
C#
using Auth0.ManagementApi;
using System.Threading.Tasks;
using Auth0.ManagementApi.Connections.ScimConfiguration;

public partial class Examples
{
    public async Task Example() {
        var client = new ManagementClient(
            token: "<token>"
        );

        await client.Connections.ScimConfiguration.Tokens.CreateAsync(
            id: "id",
            request: new CreateScimTokenRequestContent()
        );
    }

}
package example

import (
context "context"

client "github.com/auth0/go-auth0/management/management/client"
scimconfiguration "github.com/auth0/go-auth0/management/management/connections/scimconfiguration"
option "github.com/auth0/go-auth0/management/management/option"
)

func do() {
client := client.NewClient(
option.WithToken(
"<token>",
),
)
request := &scimconfiguration.CreateScimTokenRequestContent{}
client.Connections.ScimConfiguration.Tokens.Create(
context.TODO(),
"id",
request,
)
}
package com.example.usage;

import com.auth0.client.mgmt.ManagementApi;
import com.auth0.client.mgmt.resources.connections.scimconfiguration.tokens.requests.CreateScimTokenRequestContent;

public class Example {
public static void main(String[] args) {
ManagementApi client = ManagementApi
.builder()
.token("<token>")
.build();

client.connections().scimConfiguration().tokens().create(
"id",
CreateScimTokenRequestContent
.builder()
.build()
);
}
}
<?php

namespace Example;

use Auth0\SDK\API\Management\Management;
use Auth0\SDK\API\Management\Connections\ScimConfiguration\Tokens\Requests\CreateScimTokenRequestContent;

$client = new Management(
token: '<token>',
);
$client->connections->scimConfiguration->tokens->create(
'id',
new CreateScimTokenRequestContent([]),
);
from auth0.management import ManagementClient

client = ManagementClient(
token="<token>",
)

client.connections.scim_configuration.tokens.create(
id="id",
)
require "auth0"

client = Auth0::Management.new(token: "<token>")

client.connections.scim_configuration.tokens.create(id: "id")
import { ManagementClient } from "auth0";

async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.connections.scimConfiguration.tokens.create("id", {});
}
main();
import { ManagementClient } from "auth0";

async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.connections.scimConfiguration.tokens.create("id", {});
}
main();
curl --request POST \
--url https://{tenantDomain}/api/v2/connections/{id}/scim-configuration/tokens \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"scopes": [
"<string>"
],
"token_lifetime": 123
}
'
{
  "token_id": "<string>",
  "token": "<string>",
  "scopes": [
    "<string>"
  ],
  "created_at": "<string>",
  "valid_until": "<string>"
}

Autorisations

Authorization
string
header
requis

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Paramètres de chemin

id
string
requis

The id of the connection to create its SCIM token

Corps

SCIM Token

scopes
string[]

The scopes of the scim token

Minimum array length: 1

The token's scope

token_lifetime
integer | null

Lifetime of the token in seconds. Must be greater than 900

Réponse

The connection's SCIM token was created. See Response Schemas for schema.

token_id
string

The token's identifier

token
string

The scim client's token

scopes
string[]

The scopes of the scim token

The token's scope

created_at
string

The token's created at timestamp

valid_until
string

The token's valid until at timestamp