From 1385a3cefc7312a3f18e8d78a854411b53c75e67 Mon Sep 17 00:00:00 2001 From: Ken Date: Wed, 1 Nov 2017 13:27:17 -0400 Subject: Initial commit of the new logs. --- .../_sources/authorization/authorization.rst.txt | 73 ++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 build/html/_sources/authorization/authorization.rst.txt (limited to 'build/html/_sources/authorization/authorization.rst.txt') diff --git a/build/html/_sources/authorization/authorization.rst.txt b/build/html/_sources/authorization/authorization.rst.txt new file mode 100644 index 0000000..c61e51f --- /dev/null +++ b/build/html/_sources/authorization/authorization.rst.txt @@ -0,0 +1,73 @@ +.. _authorization: + +Authorization +============= + +We require a JSON Web Token `JWT `_. be sent along with your request via the Authorization header. +JWTs are passed as bearer tokens in the Authorization header, and look like the following: + +Authorization: + +There's no need to create JWTs manually, they will be created for you when you register for the API - `Register Here! `_. In some cases an X-API-KEY will give you more access to information, and in all cases it means that you are operating under a per-token rate limit. + +To specify the Headers, use this code: + +**Shell** + + +.. code-block:: shell + + //Shell + + # With shell, you can just pass the correct header with each request + curl "" \ + -H "Authorization: " + -H "Accept: application/vnd.api+json" + + +.. code-block:: java + + //Java + + import java.io.*; + import java.net.*; + + URL url = new URL(""); + HttpURLConnection conn = (HttpURLConnection) url.openConnection(); + conn.setRequestMethod("GET"); + conn.setRequestProperty("Authorization",""); + conn.setRequestProperty("Accept", "application/vnd.api+json"); + + conn.getInputStream() + + +.. code-block:: python + + //Python + + import requests + + url = "" + + header = { + "Authorization": "", + "Accept": "application/vnd.api+json" + } + + r = requests.get(url, headers=header) + + +.. code-block:: go + + //Go + + import "net/http" + + client := &http.Client{} + req, _ := http.NewRequest("GET","",nil) + req.Header.Set("Authorization", "") + req.Header.Set("Accept", "application/vnd.api+json") + res, _ := client.Do(req) + +.. toctree:: + :maxdepth: 2 -- cgit v1.3.1