haydenwoodhead / burner.kiwi

No bullshit temporary mail service written in Go
https://burner.kiwi
MIT License
214 stars 26 forks source link

How to use the api? #18

Closed Radioactivebun0 closed 3 years ago

Radioactivebun0 commented 3 years ago

Ok, so I have never used an api before, so this could be a dumb question... The id was "22fd0760-67aa-461b-ba34-16c1f82f9219" So in python3 I executed:

import requests
r=requests.get("https://burner.kiwi/api/v1/inbox/22fd0760-67aa-461b-ba34-16c1f82f9219")
print(r.text)

and I got:

'{"success":false,"errors":{"code":500,"msg":"Unauthorized: given auth key invalid"},"result":null,"meta":{"version":"37a54f8","by":"Hayden Woodhead"}}\n'

Any ideas on how to fix this? Thanks!

haydenwoodhead commented 3 years ago

@Radioactivebun0 you need to add the X-Burner-Key header.

See: