Platform Integration



I am experimenting with doing a platform integration for H5P in Java and so far so good, I got basic functionality for viewing and editing H5P content.

But currently I am working on the endpoints for the hub and I am struggling a bit with the updateContentTypeCache stuff. The registering with h5p works fine, but when sending a request to like in the php implementations I am getting a 404 status code.

Does somebody know what I am missing here?

At least to me it looks like that is where the request is being sent in the php implementations, it should be a post request with the uuid and other things as a json object right? I feel like there is something bein added to the url somewhere but I am currently not finding it


Thank you in advance and best regards


thomasmars's picture

Are you generating the UUID yourself ? Make sure that it is not longer than 36characters, as that is a limitation forced at the endpoint.
You should really not be generating the UUID yourself, you should send the first request to the "" endpoint without any UUID, then you will get a unique UUID back, which you'll register for the site.
If it is still not working after this please show us an example of a post request that gets 404'd.

The only thing that is really required for the endpoint to get the content-types is the UUID. However you can add the following additional data to track for your site:

  • platform_name
  • platform_version
  • h5p_version
  • disabled (whether automatic fetching of libraries from is disabled for this site)
  • local_id (distinguishes between multiple servers at the same address)
  • type (type of site: internet, network, local)
  • core_api_version

You should be able to find this data in one of the already implemented platforms

I'm really excited about your integration and hope you'll succeed, please keep us updated on your progress :)

Best regards, Thomas

Thanks for the answer the request to "" works fine and I am getting the a uuid.

My problem is the request to "" which should be a post request with the uuid in a json object as payload right?

I am trying to implement it the same way as it is in the wordpress implementation:

$data = $interface->fetchExternalData(H5PHubEndpoints::createURL(H5PHubEndpoints::CONTENT_TYPES), $postData);

in updateContentTypeCache in h5p.classes.php.

My implementation gives me a 404. I tried http and https and trailing / no trailing slash.

As I said I think I am missing something, sadly I currently can't debug the wordpress implementation but I hope you can help.

thomasmars's picture

Hi, sorry for the slow answer. The post should be a form, with uuid, not a json object.
The following will work for instance:

POST /v1/content-types/ HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Cache-Control: no-cache


Hi, thats it thank you very much :)

I was looking int the wrong place, don't know why I thought it should be json

castelmager's picture


Are you plannig to share the java integration ? If so we will be very happy :D


I can't make any promises but the integration will be released at some point in the future ^^

Don't expect it this year though...


I have two smaller issues:

1. There is a double slash in a url generated in the frontend which works for current implementations but causes me some problems and is not intended I guess. I've created a github issue: but I am not sure if you are using those anymore because you have Jira right?

2. I have a problem with the translation files for the editor. I am trying to add them to the javascript of the json returned by getLibraryData (like here But the problem is that this results in problems with subcontent (specifically I think the scripts are not loaded). I've gotten the latest wordpress plugin from git and installed it and it seems to have the same problem for languages that are not the default. I made a screenshot for the editor trying to edit IteractiveVideo in wordpress:

editor bug

I think it has something to do with how the scripts are loaded in the frontend: .


Best regards


thomasmars's picture

1) We're still using and checking github, but they're converted into JIRA issues so we'll be able to prioritize them and so that the community can follow the progress on issues that they want solved. I have created a JIRA issue from the github issue where you can follow along the progress:

2) It seems like you're using the 'master' branch. You should use the 'stable' branch from github if you're going to use it in production, there are no guarantees on where the 'master' branch is, since it is our active development branch. Currently the 'master' branch requires some new versions of certain libraries, among them the Interactive Video library. Furthermore could you check your console for any errors when this happens ?

Best regards, Thomas

Ah thank you very much for adding the issue.


Regarding the second issue: you are also absolutely right I shoud use the stable version as my reference.

There is no error in the console when this happens. I debugged the thing a bit myself before and the problem seems to be that the way scripts for subcontent are loaded was changed. So in getLibraryData the scriptPaths and the content of the scripts have been added to the libraryData.javascript. Now only the paths are added and libraryData.javascript is an array and it is iterated in the frontend with forEach. Which works fine with the default language because no extra translation scripts are added to the array.

If language scripts are added now they still are added to a field named the hash of the script and value the content of the script. This results in libraryData.javascript not being a javascript array anymore and forEach can't be used / just doesn't do anything. So in this case neither the scripts nor the language scripts (translations) are loaded.


Best regards


icc's picture

Thank you for point out the issue but I think fnoks has already made a fix for it.

Very nice, thank you :)


I would like to know what is the status of the H5P Java platform integration. We are looking for options to integrate the power of H5P to view and edit H5P content in our Java/Angular app.

Looking forward to any update on the project.