Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getcname.php #33

Closed
Wallvon opened this issue Dec 12, 2023 · 8 comments · Fixed by #34
Closed

getcname.php #33

Wallvon opened this issue Dec 12, 2023 · 8 comments · Fixed by #34
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed P2 Priority two, medium priority fix

Comments

@Wallvon
Copy link
Owner

Wallvon commented Dec 12, 2023

Validate domain by CNAME

This endpoint allows you to add a domain using CNAME validation instead of DNS validation. It uses a POST request, which is confusing because it's called getcname but whatever.

Right now it is not possible to create an account with an domain that has been verified by CNAME via the API! Its only possible to manually add that in vPanel.
- BastelPichi

Required parameters:

  • api_user
  • api_key
    - username
  • domain_name

XML API:

https://panel.myownfreehost.net/xml-api/getcname.php

Example response:

73081144a0525fde6ba1b0510684efcf

JSON API:

https://panel.myownfreehost.net/json-api/getcname.php

Example response:

73081144a0525fde6ba1b0510684efcf

Thanks to @BastelPichi for bringing up the missing endpoint.

@Wallvon Wallvon added enhancement New feature or request help wanted Extra attention is needed P2 Priority two, medium priority fix labels Dec 12, 2023
@Wallvon Wallvon self-assigned this Dec 12, 2023
@BastelPichi
Copy link
Contributor

curl -X POST https://panel.myownfreehost.net/xml-api/getcname.php -d 'domain_name=domain.com&username=hname_12345678&api_user=XXXXXXXXX&api_key=XXXXXXXXXX' -u XXXXXXX:XXXXXXXXXX
Returns: 73081144a0525fde6ba1b0510684efcf

Using the json API vs the XML API makes no difference.
The username is irrelevant and doesnt matter. (they probably left it in by mistake), however its still good practice to send the actual username.

By creating an CNAME record from HASH_VALUE.domain.com to ns1.byet.org the domain can be added to cPanel without changing nameservers.

Right now it is not possible to create an account with an domain that has been verified by CNAME via the API! Its only possible to manually add that in vPanel.

@BastelPichi
Copy link
Contributor

IMG_20231213_091633.jpg

You shouldn't need the username now anymore.

@Wallvon
Copy link
Owner Author

Wallvon commented Dec 13, 2023

IMG_20231213_091633.jpg

You shouldn't need the username now anymore.

Seems like they've broken the endpoint with that change since now I only get ERROR :The API key or API username entered is not valid. .

It also seems like they changed back to query parameters instead of multipart form, just like all other endpoints.

@BastelPichi
Copy link
Contributor

IMG_20231213_091633.jpg

You shouldn't need the username now anymore.

Seems like they've broken the endpoint with that change since now I only get ERROR :The API key or API username entered is not valid. .

It also seems like they changed back to query parameters instead of multipart form, just like all other endpoints.

The other endpoints do use body data (at least thats how your docs specify it and that way it also works). What happens if you use body data?

@Wallvon
Copy link
Owner Author

Wallvon commented Dec 13, 2023

The other endpoints do use body data (at least thats how your docs specify it and that way it also works). What happens if you use body data?

I get the same error then it seems.

@BastelPichi
Copy link
Contributor

The other endpoints do use body data (at least thats how your docs specify it and that way it also works). What happens if you use body data?

I get the same error then it seems.

Thats interesting, ill look into this later.

Wallvon added a commit that referenced this issue Dec 13, 2023
@Wallvon Wallvon mentioned this issue Dec 13, 2023
@Wallvon
Copy link
Owner Author

Wallvon commented Dec 13, 2023

I've contacted iFastNet about this and I'm currently waiting for a reply ^

@Wallvon
Copy link
Owner Author

Wallvon commented Dec 13, 2023

image

This issue is resolved now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed P2 Priority two, medium priority fix
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants