Streak

Streak API – Developers

You'll find comprehensive guides and documentation to help you start working with the Streak API as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    

Setting up Streak with Postman

New to APIs or need help setting up our API with Postman?

Postman is a great way to explore the Streak API and get more comfortable with what's possible when using it. If this is your first time using an API or Postman, this article will walk you through setting up Postman and sending your first few requests to the Streak API.

If you haven't already, you'll need to download and install Postman to follow along.

Configuration and set-up

After installation and launching, you'll be greeted with the following window:

We'll be establishing a few basic requests in this guide, so let's start with a Collection in Postman. This will allow you to organize your requests around a single authorization and simplify things down the road.

After filling in the title and description of a Collection, head over to the next tab.

Authorization

Streak's API uses Basic Auth for our authorization/authentication method. Your API key will be used as the Username, with the password left blank. If you haven't generated an API key yet, go back to Authentication and generate one.

The tab should look something like this:

After tapping Create you should be all set to use the Streak API.

Sending your first request

Now that you've completed set-up for a Collection, we can send a request to a Streak API endpoint to verify that it's working.

Add a request

From the left column of Postman, you'll see your new collection with the option to Add requests to it. Click that button and fill in the details to save your request:

With that filled out, click Save to Streak API. You'll be brought back to the same screen before. Tap your new request and select Open in builder.

Get current user

This request can be to any end point in the Streak API, but for now we'll be sending a GET request to the [https://www.streak.com/api/v1/users/me](https://streak.readme.io/v1/reference#get-current-user) endpoint.

Remember that the type of request needs to match what our API expects – a GET request for an endpoint expecting a PUT, DELETE, or POST can lead to unintended results and consequences.

Your request should return JSON in the body beneath the builder:

If you're not seeing a result similar to what's above, please make sure your authorization settings in the collection are accurate and the request your sending matches the instructions above.

When you're done, press the Save button toward the top right of the application. You've sent your first request to the Streak API!