Access Using JWT and API Key
From DreamFactory
RusselWwn09 (Talk | contribs) (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: | ||
− | + | ### 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
- 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
{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} ...
- 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
- 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