XenForo
Installing the Realms.tv add-on
- Before installing the Realms.tv add-on, you need to install the API add-on. You can find the API add-on here.
- Manual Installation
- Once you download, save the .zip file somewhere you are familiar with.
- Next, you will want to extract the files. After that is done you will need to upload the contents inside the upload folder into your root XenForo directory.
- After you have uploaded the files you will need to navigate to the Add-ons section within your XenForo admin panel. Here you will see it listed under "Installable add-ons". Just click Install!
- Congratulations! You have officially installed the Realms.tv add-on on your site.
- ZIP Upload (XenForo 2.1. and higher)
- Once you download, save the .zip file somewhere you are familiar with.
- After you have downloaded the file, you will need to navigate to the Add-ons section within your XenForo admin panel. Click “Install/upgrade from archive” and follow the on-screen instructions. When asked for an add-on archive, select the previously downloaded file.
- Congratulations! You have officially installed the Realms.tv add-on on your site.
Recommendations for XenForo communities on Apache servers
When Apache is used, Apache will need to be told to send the authorization header to PHP. XenForo’s default HTAccess comes with this line commented out and it will simply need to be uncommented.
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
Create an OAuth2 Client
- Navigate to Setup > Authentication > OAuth2
- Click “Create OAuth2 Client”
- Your OAuth2 Client needs to be confidential
- Name: The name of your realm
- Redirect URL:
- https://realm-name.realms.tv/auth/xenforo
- Where you see “realm-name” enter the name of your realm
- Options: These are the options to be enabled within this section
- Only require a user to authorize the connection once: If enabled, a user will only be asked to authorize the authentication when there is not currently an active access token. If the issued access token expires, or is revoked they will be asked to approve it again.
- Single token: If enabled only a single token can be generated per user. Once a new token has been generated any old tokens will be immediately revoked.
- Require user to be in a valid state: If enabled, a user will only be able to authenticate using this OAuth client if their account is in a valid state (email validated, approved by admin, etc.)
- Override default refresh token TTL: If selected, you can specify a TTL for refresh tokens created for this client in seconds that will override the default value.
- Set this value to 315360000.
- Authentication template: Override the default authentication template
<xf:include template="realms_oauth2_authorize" />
- Allowed scopes:
- Realms: Dynamically assigns scopes for Streaming
- Click save
Create an API Key
- Navigate to Setup > Authentication > XenForo default API key
- Title: The name of your realm
- Key type: Your key should be a Super User Key
- Allowed scopes: Select the “All scopes” option
- API key is active: This option should be enabled in order to use the API Key
Connecting your XenForo community to Realms.tv
- Add the API Key you created within your XenForo community
- Add your base URL (example: xenforo.com or xenforo.com/community)
- Add the Client ID and Client Secret you copied in a previous step.
- Click “Add”
- Save your integration. Once you’ve saved the integration, copy the authentication provider ID.
Add a realm in your XenForo ACP
- Navigate to Realms.tv > Realms
- Click “ Add realm”
- Name: The name of your realm
- Slug: the custom portion of your realm URL
- API Key: Your realms’ API key can be found in the Manager Panel of your Realm under integrations by clicking “Add” on the XenForo integration
- Authentication Provider ID: Enter the ID that you copied from your realm in the previous step.
- OAuth Client: Select the OAuth Client you created in the previous section
- Enabled: This option determines whether your realm is available and accessible
- Environment slug: This option would be used if you were creating a testing realm for example, but can be left blank if you’re creating this realm for production purposes.