cant use api to add a new dns record

ive been trying to create a dns record using the api but its not currently working the data im sending:
(
'type' => 'A',
'name' => 'test.xytriza.com',
'content' => 'serverip',
'proxied' => true,
'ttl' => 600,
)
(
'type' => 'A',
'name' => 'test.xytriza.com',
'content' => 'serverip',
'proxied' => true,
'ttl' => 600,
)
headers:
(
'X-Auth-Email: [email protected]',
'X-Auth-Key: my global api key',
'Content-Type: application/json'
)
(
'X-Auth-Email: [email protected]',
'X-Auth-Key: my global api key',
'Content-Type: application/json'
)
and it still returns auth error, yet ive tried with curl, php curl, and other stuff. cant seem to get it to work
2 Replies
Dennis - Digital Solutions
Hi, you should use a token instead of the global api key. You can create them in your profile. Make sure to grant it the least amount of access. Then use the account that you used to create the token in the email header
Xytriza
XytrizaOP8mo ago
can you give me a example of what id do with it? im not too sure how the api works rn any solution? just realized i can do * so no need for this unless anybody finds a solution
Want results from more Discord servers?
Add your server