Quantcast
Channel: Active questions tagged ruby - Stack Overflow
Viewing all articles
Browse latest Browse all 4622

Heroku Platform API - Domain Create Error

$
0
0

I'm trying to create custom domains in Heroku through a controller action in my rails app. For now I just have a method in a controller to create the domains. I've been messing around with it for a few hours, but I keep getting either an unprocessable entity error or a 404 not found error.

Here's my code:

def create_custom_domain        heroku = PlatformAPI.connect_oauth('[TOKEN]')        heroku.domain.create('[APPNAME]', { hostname: "[www.abc.com]", sni_endpoint: "" })        redirect_to root_path    end

I've also tried making the value of the sni_endpoint parameter null because the docs say it's nullable, but that doesn't work either.

I've been using the Heroku api docs and I can't seem to figure out what's wrong. If anyone has any ideas, please let me know.

Here are the docs I've been looking at:

https://github.com/heroku/platform-api

https://heroku.github.io/platform-api/PlatformAPI/Domain.html

https://devcenter.heroku.com/articles/platform-api-reference#domain


Viewing all articles
Browse latest Browse all 4622


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>