Access Using JWT and API Key

From DreamFactory
Jump to: navigation, search
DreamFactoryTutorialsAccess Using JWT and API Key
(Created page with "Hey there dear visitor. I am Isaias and I love it. To do archery is something my spouse doesn't truly like yet I do. I currently stay in Iowa and also my moms and dads live...")
 
(Created page with "### Tutorial You can consume DreamFactory 2.0 APIs by providing the combination of JWT and API Key. This is more appropriate in case of a non-admin user. When consuming APIs...")
Line 1: Line 1:
Hey there dear visitor. I am Isaias and I love it. To do archery is something my spouse doesn't truly like yet I do.  I currently stay in Iowa and also my moms and dads live close by. Sending off is what I do and also the wage has been really fulfilling. I have actually been dealing with my web site for some time now. Examine it out here: http://www.etsy.com/listing/192255287/12-paleo-chocolate-chip-cookies-with<br><br>Here is my web page - paleo chocolate chip cookie recipe ([http://www.etsy.com/listing/192255287/12-paleo-chocolate-chip-cookies-with Suggested Internet site])
+
### Tutorial
 +
 
 +
You can consume DreamFactory 2.0 APIs by providing the combination of JWT and API Key. This is more appropriate in case
 +
of a non-admin user. When consuming APIs using JWT and application API Key, access is limited by the role assigned to the
 +
user for the application of the API Key being used. Admin users always have access to all APIs using just the JWT.  
 +
 
 +
### API Endpoints
 +
 
 +
<pre>{Method} https://{url}/api/v2/{service}/{resource}?session_token={JWT}&api_key={api-key}</pre>
 +
 
 +
-- OR --
 +
 
 +
<pre>{Method} https://{url}/api/v2/{service}/{resource}</pre>
 +
Request header
 +
<pre>
 +
...
 +
X-DreamFactory-Session-Token: {JWT}
 +
X-DreamFactory-Api-Key: {api_key}
 +
...
 +
</pre>
 +
 
 +
### Example - Using URL parameter
 +
 
 +
* Service: system
 +
* Resource: user
 +
* Session Token: abc.123.efg
 +
* API Key: abc123efg
 +
* Method: GET
 +
* Request URL:
 +
<pre>GET https://foo.com/api/v2/system/user?session_token=abc.123.efg&api_key=abc123efg</pre>
 +
 
 +
### Example - Using request header
 +
 
 +
* Service: system
 +
* Resource: user
 +
* Session Token: abc.123.efg
 +
* API Key: abc123efg
 +
* Method: GET
 +
* Request Header:
 +
<pre>
 +
...
 +
X-DreamFactory-Session-Token: abc.123.efg
 +
X-DreamFactory-Api-Key: abc123efg
 +
...
 +
</pre>
 +
* Request URL:
 +
<pre>GET https://foo.com/api/v2/system/user</pre>

Revision as of 17:26, 15 October 2015

      1. Tutorial

You can consume DreamFactory 2.0 APIs by providing the combination of JWT and API Key. This is more appropriate in case of a non-admin user. When consuming APIs using JWT and application API Key, access is limited by the role assigned to the user for the application of the API Key being used. Admin users always have access to all APIs using just the JWT.

      1. API Endpoints
{Method} https://{url}/api/v2/{service}/{resource}?session_token={JWT}&api_key={api-key}

-- OR --

{Method} https://{url}/api/v2/{service}/{resource}

Request header

...
X-DreamFactory-Session-Token: {JWT}
X-DreamFactory-Api-Key: {api_key}
...
      1. Example - Using URL parameter
  • Service: system
  • Resource: user
  • Session Token: abc.123.efg
  • API Key: abc123efg
  • Method: GET
  • Request URL:
GET https://foo.com/api/v2/system/user?session_token=abc.123.efg&api_key=abc123efg
      1. Example - Using request header
  • Service: system
  • Resource: user
  • Session Token: abc.123.efg
  • API Key: abc123efg
  • Method: GET
  • Request Header:
...
X-DreamFactory-Session-Token: abc.123.efg
X-DreamFactory-Api-Key: abc123efg
...
  • Request URL:
GET https://foo.com/api/v2/system/user