0

I have a requests query need to addition the credential.

The apis from this production:

https://www.riskiq.com/products/passivetotal/

According to the page stackoverflow question

I can use the user:pass@ format to api address https://api.passivetotal.org/v2/dns/passive/unique/

but my user String is myname@email.com

how to do this format?

On this address, it also said Alternately you can use credential with your http header like below:

Authorization: Basic XXXXXX

I put:

Authorization: Basic  base64(myname@email.com.au:keystring)

in http head, but it do not working. It still give me 405 error

status: 405
{
   "message": "The method is not allowed for the requested URL."
}

what is the correct way to writing http head like this.

only curl -u command works.

ps: any way to see the raw request of curl

user504909
  • 9,119
  • 12
  • 60
  • 109

1 Answers1

0

You need to base64-encode "username:password". See https://www.greenbytes.de/tech/webdav/rfc7617.html#rfc.section.2.

Julian Reschke
  • 40,156
  • 8
  • 95
  • 98