You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Taku AMANO edited this page Aug 28, 2013
·
4 revisions
Notice
This method is deprecated when useing web browser.
When useing web browser, the recommended authentication steps is redirecting to URL acquired by the getAuthorizationUrl method.
authenticate
Create a new session and access token. This is like login.
POST https://your-host/your-mt-api.cgi/v1/authentication Detail
Parameters
Name
Type
Required
Description
callback
Function
no
Returns
XMLHttpRequest: A XMLHttpRequest object
Example
api.authenticate({username: "USERNAME",password: "PASSWORD",remember: true},function(response){if(response.error){// Handle errorreturn;}api.storeTokenData(response);api.listEntries(blogId,function(response){// Do stuff});});