Homey Community Forum

Web API 404 not found

Im trying to develop a new app and I need a simple api call enabled. So to start I just added a api.js file and more or less just copy pasted in the example.

module.exports = [
{
method: “GET”,
path: “/”,
public: true,
fn: function (args, callback) {
//const result = Homey.app.getSomething();
const result = “hej”;
// callback follows ( err, result )
callback(null, result);

  // access /?foo=bar as args.query.foo
},

},
];

But I get 404 not found.
Im using this URL:
https://XXX.connect.athom.com/api/app/com.myapp/

It feels like there is just something small missing. Some permission or something. Have worked with it a long time a go but cant remember now.

Any body that can give me a hint

Looks like its a SDK 3 thing. I changed to SDK 2 and it works.