メインコンテンツへスキップ
POST
https://{tenantDomain}/api/v2
/
token-exchange-profiles
Go
package example

import (
    client "github.com/auth0/go-auth0/management/client"
    option "github.com/auth0/go-auth0/management/option"
    context "context"
    management "github.com/auth0/go-auth0/management"
)

func do() () {
    client := client.NewClient(
        option.WithToken(
            "<token>",
        ),
    )
    client.TokenExchangeProfiles.Create(
        context.TODO(),
        &management.CreateTokenExchangeProfileRequestContent{
            Name: "name",
            SubjectTokenType: "subject_token_type",
            ActionId: "action_id",
        },
    )
}
{
  "id": "<string>",
  "name": "Token Exchange Profile 1",
  "subject_token_type": "<string>",
  "action_id": "<string>",
  "type": "custom_authentication",
  "created_at": "2024-01-01T00:00:00.000Z",
  "updated_at": "2024-01-01T00:00:00.000Z"
}

承認

Authorization
string
header
必須

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

ボディ

name
string
デフォルト:Token Exchange Profile 1
必須

Friendly name of this profile.

Required string length: 3 - 50
subject_token_type
string<url>
必須

Subject token type for this profile. When receiving a token exchange request on the Authentication API, the corresponding token exchange profile with a matching subject_token_type will be executed. This must be a URI.

Required string length: 8 - 100
action_id
string
必須

The ID of the Custom Token Exchange action to execute for this profile, in order to validate the subject_token. The action must use the custom-token-exchange trigger.

Required string length: 1 - 36
type
enum<string>
必須

The type of the profile, which controls how the profile will be executed when receiving a token exchange request.

利用可能なオプション:
custom_authentication
Required string length: 1 - 21

レスポンス

Token exchange profile successfully created.

id
string<token-exchange-profile-id>

The unique ID of the token exchange profile.

name
string
デフォルト:Token Exchange Profile 1

Friendly name of this profile.

Required string length: 3 - 50
subject_token_type
string<url>

Subject token type for this profile. When receiving a token exchange request on the Authentication API, the corresponding token exchange profile with a matching subject_token_type will be executed. This must be a URI.

Required string length: 8 - 100
action_id
string

The ID of the Custom Token Exchange action to execute for this profile, in order to validate the subject_token. The action must use the custom-token-exchange trigger.

Required string length: 1 - 36
type
enum<string>

The type of the profile, which controls how the profile will be executed when receiving a token exchange request.

利用可能なオプション:
custom_authentication
Required string length: 1 - 21
created_at
string<date-time>
デフォルト:2024-01-01T00:00:00.000Z

The time when this profile was created.

updated_at
string<date-time>
デフォルト:2024-01-01T00:00:00.000Z

The time when this profile was updated.