PATCH
/userinfo
application/json
PATCH /userinfo HTTP/1.1Content-Type: application/jsonAuthorization: Bearer ACCESS_TOKEN_WITH_OPENID_SCOPEHost: sample.portal.tencentciam.com{"nickname" : "MOCK_NICKNAME"}
名称 | 描述 |
Authorization | OAuth 2.0 Bearer Token,格式为 Bearer <Token> ,其中 Bearer 为固定字符串,<Token> 为用户登录成功时得到的具备 openid scope 的 Access Token ,Bearer 和 <Token> 之间用一个空格隔开。 |
JSON 路径 | 数据类型 | 描述 |
phone_number | String | 用户的手机号,限国内三大运营商11位手机号。传递此参数时,须同时传递 phone_number_otp_token 和 phone_number_otp 两个参数。 |
phone_number_otp_token | String | 发送短信验证码成功后服务端返回的 otp_token 。 |
phone_number_otp | String | 用户手机收到的 OTP 验证码。 |
email | String | 用户的邮箱地址。传递此参数时,须同时传递 email_otp_token 和 email_otp 两个参数。 |
email_otp_token | String | 发送邮箱验证码成功后服务端返回的 otp_token 。 |
email_otp | String | 用户邮箱收到的 OTP 验证码。 |
name | String | 用户姓名。 |
nickname | String | 用户昵称。 |
zoneinfo | String | 用户时区,如 Asia/Shanghai 或 Europe/Paris 。 |
locale | String | 用户 locale 信息,如 zh-CN 或 en-US 。 |
HTTP/1.1 200 OKContent-Type: application/json{"sub" : "MOCK_USER_ID","email" : "MOCK_USERNAME@example.com","name" : "MOCK_NAME","nickname" : "MOCK_NICKNAME","zoneinfo" : "Asia/Shanghai","locale" : "zh-CN"}
sub
字段一定返回外,其余返回哪些字段由应用参数配置中的 Claims
决定。HTTP/1.1 400 Bad RequestContent-Type: application/json;charset=UTF-8{"error" : "invalid_request","error_description" : "Unknown attribute(s) found."}
HTTP/1.1 400 Bad RequestContent-Type: application/json;charset=UTF-8{"error" : "invalid_request","error_description" : "Unsupported user attribute(s) found."}
HTTP/1.1 400 Bad RequestContent-Type: application/json;charset=UTF-8{"error" : "malformed_phone_number"}
HTTP/1.1 400 Bad RequestContent-Type: application/json;charset=UTF-8{"error" : "duplicate_phone_number"}
phone_number_otp_token
错误或已过期,或注册时使用的参数与发送验证码时不一致(例如:手机号不同)。HTTP/1.1 400 Bad RequestContent-Type: application/json;charset=UTF-8{"error" : "bad_phone_number_otp_token"}
phone_number_otp
错误或已过期。HTTP/1.1 400 Bad RequestContent-Type: application/json;charset=UTF-8{"error" : "bad_phone_number_otp"}
HTTP/1.1 400 Bad RequestContent-Type: application/json;charset=UTF-8{"error" : "malformed_email"}
HTTP/1.1 400 Bad RequestContent-Type: application/json;charset=UTF-8{"error" : "duplicate_email"}
email_otp_token
错误或已过期,或注册时使用的参数与发送验证码时不一致(例如:邮箱不同)。HTTP/1.1 400 Bad RequestContent-Type: application/json;charset=UTF-8{"error" : "bad_email_otp_token"}
email_otp
错误或已过期。HTTP/1.1 400 Bad RequestContent-Type: application/json;charset=UTF-8{"error" : "bad_email_otp"}
HTTP/1.1 400 Bad RequestContent-Type: application/json;charset=UTF-8{"error" : "illegal_parameter_value"}
bearer_token
缺失。HTTP/1.1 400 Bad RequestWWW-Authenticate: Bearer error="invalid_request", error_description="Bearer token not found in the request", error_uri="https://tools.ietf.org/html/rfc6750#section-3.1"
bearer_token
错误。HTTP/1.1 401 UnauthorizedWWW-Authenticate: Bearer error="invalid_token", error_description="Error decoding JWT", error_uri="https://tools.ietf.org/html/rfc6750#section-3.1"
bearer_token
无效。HTTP/1.1 403 ForbiddenWWW-Authenticate: Bearer error="insufficient_scope", error_description="The request requires higher privil
本页内容是否解决了您的问题?