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
This method is deprecated when useing web browser.
When useing web browser, The recommended way 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
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});});