Calling the Resources API on a memoQ cloud server from Google Scripts

In Google Scripts, use the following code to authenticate on the Resources API of a memoQ cloud server:

function restAPILogin() {
    var restURL = ""; [^]
    var headers = {
        "contentType" : "application/json",
        "Accept" : "application/json"
    var payload = {
        "username": "username",
        "password": "password",
        "LoginMode": "0"
    var options =
        "method" : "post",
        "headers" : headers,
        "payload" : payload
    // Call the rest API
    var result = UrlFetchApp.fetch(restURL + "/auth/login", options);
    return result.AccessToken;

Make sure you use "contentType" as in the example above, and specify "LoginMode" as a string.

(0 vote(s))
This article was helpful
This article was not helpful

Comments (0)
Help Desk Software by Kayako