Session
Login
POST
https://peertube2.cpy.re/api/v1/users/token
With your client id and secret, you can retrieve an access and refresh tokens.
Body
application/x-www-form-urlencoded
One of
client_ idstringrequiredExample
v1ikx5hnfop4mdpnci8nsqh93c45rldfclient_ secretstringrequiredExample
AjWiOapPltI6EnsWQwlFarRtLh4u8tDtgrant_ typestringpasswordrequiredimmutable name of the user, used to find or mention its actor
Example
chocobozzzpasswordpassword<password>externalAuthTokenstringIf you want to authenticate using an external authentication token you got from an auth plugin (like peertube-plugin-auth-openid-connect for example) instead of a password or a refresh token, provide it here.
client_ idstringrequiredExample
v1ikx5hnfop4mdpnci8nsqh93c45rldfclient_ secretstringrequiredExample
AjWiOapPltI6EnsWQwlFarRtLh4u8tDtgrant_ typestringrefresh_tokenrequiredrefresh_ tokenstringrequiredExample
2e0d675df9fc96d2e4ec8a3ebbbf45eca9137bb7Parameters
x-peertube-otpstringheaderIf the user enabled two factor authentication, you need to provide the OTP code in this header
Response
200OKobject
successful operation
400Bad Request
Disambiguate via code:
invalid_clientfor an unmatchedclient_idinvalid_grantfor unmatched credentials
401Unauthorized
Disambiguate via code:
- default value for a regular authentication failure
invalid_tokenfor an expired tokenmissing_two_factorif two factor header is missing