API is confusing

I’m not sure if I did it correctly. But test was successful.

In the Docs my eyes went here and

Note that the rest of the documentation and guides will simply includeemail-address and api-keyfor the examples. You must include your authentication header for all requests.

here.

Most clients will implement basic authentication for you, however if you need to implement it yourself, you need to base64 encode your email address and password or API key seperated by a colon. For example, if your email address is keanu.reeves@test.escrow.com and your API key is myhorseisamazing, then you would base64 encode keanu.reeves@test.escrow.com:myhorseisamazing, which would result in a2VhbnUucmVldmVzQGVzY3Jvdy5jb206bXlob3JzZWlzYW1hemluZw==. Using this value, you would then pass the Authorizationheader with the value: Basic a2VhbnUucmVldmVzQGVzY3Jvdy5jb206bXlob3JzZWlzYW1hemluZw==

And under the docs the 401 error code :

image

Then I searched about that in the forum and I found this post that Colin posted.

And I clicked that link and then I gave the email and the password there that I gave on Escrow and it gave me Authorization: Basic and a ID. Then I copied the Basic with the ID and I created a Header first and added Authorization and added the Basic and ID to the value. Then I added a query and I put -u for name and to the value I entered the email address that gave to escrow and entered the API key that created in escrow and added a space between com and API key starting word/number .

Then I created the 2nd query and added Content-Type as name and application/json as the value. Then I pasted the JSON in the Body section and created the inputs and renamed the JSON body with that inputs. And finally I got Test Successful.

I’m not so much good at working with API’s. Have a little a knowledge about it. Not sure if I did it correctly :slightly_smiling_face:

Thank you

2 Likes