Hi,
I have tried to create an app using API endpoint /apps.
I have tested my exposed Rest API and it returns 200. So not sure why I’m getting this error response.
Hi,
I have tried to create an app using API endpoint /apps.
I have tested my exposed Rest API and it returns 200. So not sure why I’m getting this error response.
Hi, @cpinho
Based on the description of the 405 status code (Method not allowed), the endpoint that you have prepared for your SmartApp isn’t handling POST HTTP Requests (please check the SmartApp lifecycles documentation).
Regarding your last post (Which endpoint to call for app registration and verification), to verify your SmartApp you must return a GET HTTP Request to the confirmationUrl
received at the Confirmation lifecycle (you could copy/paste it at your browser as well).
Also, I’d recommend you to track the authorization token received at the Install lifecycle, because using a Personal Access Token you might get 403 Forbidden
responses.
Please, let me know if this information results useful to you.
Best regards,
Erick.
Thanks, @erickv. I was able to register the app successfully.
Regarding the Install lifecycle, is this also applicable for a regular web application? I need indeed to subscribe to events but would be lifecycle the same?
Hi, @cpinho
If you’re planning to develop a web application that handles Webhook events, please read the OAuth Integrations documentation.
Through the OAuth Integrations, your application will get authorized to interact with the SmartThings API and create Subscriptions to receive Device Event.
Best regards,
Erick.