我正在尝试使用 go sdk 访问 coginto,但我不确定如何获取令牌,我正在创建我的 cogintoidentity:
creds := credentials.NewStaticCredentials("-id-", "-secret-", "")
sess := session.Must(session.NewSession())
sess.Config.Credentials = creds
sess.Config.Region = aws.String("us-east-1")
sess.Config.CredentialsChainVerboseErrors = aws.Bool(true)
svc := CP.New(sess) // CP == "github.com/aws/aws-sdk-go/service/cognitoidentityprovider"
log.Println(svc.ListUserPools(&CP.ListUserPoolsInput{MaxResults: aws.Int64(10)}))
但它返回The security token included in the request is invalid
。