2,743
edits
No edit summary |
|||
(3 intermediate revisions by the same user not shown) | |||
Line 1:
▲ Method: /api/public/v1/TokenAuth/Authenticate
<br/>
Line 13 ⟶ 7:
The '''AccessToken''' has an expiry date and time.<br/>
Which means programmer only need to authenticate with AOTG Cloud Server once, and make subsequent request until it is expired.
{|class="wikitable"
|'''Username and password'''
|Authentication is required to identify the requester. Username and password can be obtained after registration.<br/>To register see [[Begin AutoCount Accounting Integration via AOTG API]].
|'''API Key'''
|It is essential to identify the account book that has been registered with AOTG Server.<br/>See [[Begin AutoCount Accounting Integration via AOTG API]] on activate Account Book.
|}
==Code Snippets==
{{AOTGApiCodeSnippetTab
<syntaxhighlight lang="C#">
var client = new RestClient("http://aotg.cloud:8080/api/public/v1/TokenAuth/Authenticate");
Line 25 ⟶ 28:
IRestResponse response = client.Execute(request);
</syntaxhighlight>
|PHPcURL=
▲|-|
<syntaxhighlight lang="PHP">
<?php
Line 59 ⟶ 61:
}
</syntaxhighlight>
|PHPHttp=
▲|-|
<syntaxhighlight lang="PHP">
<?php
Line 88 ⟶ 89:
}
</syntaxhighlight>
}}
==Response==
|