View on GitHub

ModernMT Enterprise Edition

Neural Adaptive Machine Translation for professional translators

← Back to Home

API Get User

Quick example


curl -H "MMT-ApiKey:<my_api_key>" "https://api.modernmt.eu/users/me" | python -mjson.tool

{
    "data": {
        "billingPeriod": {
            "amount": 0,
            "begin": "2017-10-01T00:00:00+00:00",
            "currency": "EUR",
            "currencySymbol": "\u20ac",
            "end": "2017-11-01T00:00:00+00:00",
            "words": 0
        },
        "email": "andrea@translated.net",
        "id": 1,
        "name": "Andrea Rossi"
    },
    "status": 200
}

Description

This method retrieves the user associated to the MMT-ApiKey header sent in the HTTP Request.

If the MMT-ApiKey header is missing or invalid, this API returns an HTTP ERROR 401:

{
    "status":401,
    "error": {
        "type":"AuthException",
        "message":"Missing or invalid authentication header"
    }
}

Resource URL

https://api.modernmt.eu/users/me

Request Fields

None.

Response Fields

name The user name.

Example: Andrea Rossi
id The user id.

Example: 1
email The user email. Two users can never share the same email address.

Example: andrea@ŧranslated.net
billingPeriod The user's current billing period for this month. If there is no billing period for this month, this field will return a new billing period for this month. </table </tr>
currency The currency used for this user, in ISO 4217 standard

Example: EUR
currencySymbol The currency symbol, as a Unicode character code

Example: \u20ac
begin A timestamp marking the beginning of this billing period. If always corresponds to the first day of a month.

Example: 2017-10-01T00:00:00+00:00
end A timestamp marking the end of this billing period. If always corresponds to the first day of a month.

Example: 2017-11-01T00:00:00+00:00
amount The amount of money billed in the billing period

Example: 254.5498
words The amount of billed words in the billing period

Example: 18967
--- [← Back to Home](../)