Skip to main content

create subdomain uapi

Comments

9 comments

  • cPRex Jurassic Moderator

    Hey there!  The creation of the subdomain may or may not be related to DNS, so we'll need more details on how your host is configured.  If the DNS for the domain isn't managed on the same server as your cPanel hosting, then I would expect you to need to manually create the DNS entries for the subdomain wherever that is being managed.

    Is that the case with your system?

    0
  • Juan Francisco

    Hello, thank you for responding, it is managed automatically, my hosting is godaddy, when I create a direct subdomain in cpanel, it works correctly, only when I do it through the uapi it does not work

    0
  • cPRex Jurassic Moderator

    Can you post the exact API call you're using?  I'm personally not familiar with the PHP class portion, but you could try running this from the command line or from the URI call to see if that works better than the PHP script:

    https://api.docs.cpanel.net/openapi/cpanel/operation/addsubdomain/

    as that would at least narrow down the issue.

    0
  • Juan Francisco

    Hello, my English is somewhat bad, you mean trying to run it from the page. https://api.docs.cpanel.net/openapi/cpanel/operation/addsubdomain/ , when I do it it shows the following error

    Could not get any response
    Failed to fetch

    Why this might have happened:
    - CORS is misconfigured on the server
    - The server couldn't send a response
    - No internet access
    - Documentation issue - contact API owner
    - Misconfigured security definition, and I am using the same parameters,

     

     

    0
  • cPRex Jurassic Moderator

    I'm not sure what you mean "run it from the page" - that page is just our documentation for the API call.

    If you try the CLI or URI options on your local server it may provide different results than the PHP test you are currently doing.

    0
  • Juan Francisco

    sorry, 

    On the documentation page there is a tab where you can make API calls to test

    I have tried it through the url and it gives me the same result, the subdomain is created as well as the folder but it does not work, I have seen that not even autossl signs the subdomains, only the ones that I create manually from cpanel, those do sign and they work well

     

    0
  • cPRex Jurassic Moderator

    It would seem you only have cPanel access to your account, and not root access to the server, correct?  I tested the API call on my end and confirmed the DNS record gets written to the zone file.  If that isn't happening on your machine you'd need to contact GoDaddy to have them do some additional troubleshooting.

    0
  • Juan Francisco

    Thank you very much, I will contact godaddy to solve my problem

    0
  • cPRex Jurassic Moderator

    Sure thing - I'm sorry I can't offer more on my end!

    0

Please sign in to leave a comment.