GetSigninToken

更新时间:
复制 MD 格式

Call the GetSigninToken operation to obtain a logon token using a security token.

Description

  • This is a logon operation. The request structure is in the following format:

    https://signin.aliyun.com/federation?Action=xx&Parameters

    • Action: The operation to perform.

    • Parameters: The custom request parameters for the operation. These parameters do not include common parameters.

  • This operation does not require a signature.

  • The request parameters must be in the x-www-form-urlencoded format. If the parameters are not in this format, the call fails and an error is returned.

Request parameters

Name

Type

Required

Example value

Description

Action

String

Yes

GetSigninToken

The name of the API operation. This is a required parameter. Set the value to GetSigninToken.

AccessKeyId

String

Yes

STS.L4a*******vFDw

The AccessKey ID of the security token.

AccessKeySecret

String

Yes

wyLTS********Z9

The AccessKey secret of the security token.

SecurityToken

String

Yes

CAESr********MnLIl

The security token.

TicketType

String

Yes

Set this parameter to mini.

Response parameters

Name

Type

Example

Description

SigninToken

String

5aW96ZW/5a*******9rZW7lkYA=

The logon token. By default, the token expires in 30 seconds and can be used only once.

Note

The validity period of the AccessKeyId and AccessKeySecret determines the validity period of the SigninToken. These temporary keys are obtained through role assumption. Modify the

AssumeRole

API

DurationSeconds

This operation sets the validity period of the AccessKeyId and AccessKeySecret.

Request example

https://signin.aliyun.com/federation?Action=GetSigninToken
&AccessKeyId=STS.L4a*******vFDw
&AccessKeySecret=wyLTS*******Z9
&SecurityToken=CAESr*******MnLIl
&TicketType=mini

Response example

JSON format

{
    "RequestId": "04F0F3E73368",
    "SigninToken": "5aW96ZW/5a*******9rZW7lkYA="
}          

Error codes

HttpCode

Error code

Error message

Description

400

InvalidAction

The action GetSigninToken is invalid.

API error.

400

MissingParameter.AccessKeyId

The parameter AccessKeyId is missing.

The AccessKeyId parameter is missing.

400

MissingParameter.AccessKeySecret

The parameter AccessKeySecret is missing.

The AccessKeySecret parameter is missing.

400

MissingParameter.SecurityToken

The parameter SecurityToken is missing.

The SecurityToken parameter is missing.

401

InvalidCredential.AuthenticateFail

The credential you provided is invalid.

Invalid authentication information. Authentication failed.

401

InvalidCredential.Expired

The credential you provided is expired.

The authentication information has expired. Authentication failed.

400

InvalidParameter

Some parameters are invalid.

Invalid parameter.