OpenID

Get an OpenID token object to verify the requester's identity.

Gets an OpenID token object that the requester may supply to another service to verify their identity in Matrix. The generated token is only valid for exchanging for user information from the federation API for OpenID.

The access token generated is only valid for the OpenID API. It cannot be used to request another OpenID access token or call /sync, for example.

post/_matrix/client/v3/user/{userId}/openid/request_token

Request

Path parameters

userIdstring required

The user to request an OpenID token for. Should be the user who is authenticated for the request.

Request body

object required

Example request

{}

Response

OpenID token information. This response is nearly compatible with the response documented in the OpenID Connect 1.0 Specification with the only difference being the lack of an id_token. Instead, the Matrix homeserver's name is provided.

access_tokenstring required

An access token the consumer may use to verify the identity of the person who generated the token. This is given to the federation API GET /openid/userinfo to verify the user's identity.

expires_ininteger required

The number of seconds before this token expires and a new one must be generated.

matrix_server_namestring required

The homeserver domain the consumer should use when attempting to verify the user's identity.

token_typestring required

The string Bearer.

Changes

No recorded changes to this operation across all 1 revision of this API.