diff --git a/Teknik/Areas/Help/Views/Help/API/API.cshtml b/Teknik/Areas/Help/Views/Help/API/API.cshtml index eca15f5..c64a1b9 100644 --- a/Teknik/Areas/Help/Views/Help/API/API.cshtml +++ b/Teknik/Areas/Help/Views/Help/API/API.cshtml @@ -23,22 +23,36 @@
- The Teknik API is free for everyone to use, and is defined on a per service basis.
+ The Teknik API is free for all accounts to use, and is defined on a per service basis.
The general API calls can be summarized as follows: @Url.SubRouteUrl("api", "Api.Index")/v@(Config.ApiConfig.Version)/Service/Action
- For some services, you may be required to authenticate to access them, or to associate generated content with your account. In all cases, the same authentication methods can be used.
+ For all API services, you will be required to authenticate to access them. You can either authenticate using Oauth/OpenID Connect, or via an Auth Token. We advise to use OAuth in as many cases as possible, but when unable, Auth Tokens are persistent tokens that give you access to the API only.
+
+
+
To authenticate with OAuth or OpenID, you will need to create a client in your Developer Settings to authenticate against. Once created, you can interact with the authentication endpoint via any of the endpoints described in the discovery document.
To authenticate with an Oauth Token, you need to generate one using the token endpoint. To learn more about obtaining a token, you can
curl -H "Authorization: token OATH-TOKEN" @Url.SubRouteUrl("api", "Api.Index")/v@(Config.ApiConfig.Version)/
<OAUTH-TOKEN>
with your access token.
$ curl -H <OAUTH-TOKEN> --data code="Test" @Url.SubRouteUrl("api", "API.v1.Paste")
+ To authenticate with an Auth Token, you can generate tokens in your Developer Settings
+curl -H "Authorization: AuthToken AUTH-TOKEN" @Url.SubRouteUrl("api", "Api.Index")/v@(Config.ApiConfig.Version)/
+ <XXXXXXXXXXXXXXXXXXXX>
with your Auth Token.
+ $ curl -H "AuthToken <XXXXXXXXXXXXXXXXXXXX>"" --data code="Test" @Url.SubRouteUrl("api", "API.v1.Paste")