{"_id":"55e49f04de0d360d0027bc68","api":{"auth":"never","examples":{"codes":[{"language":"curl","code":"curl -s -S -X GET -H \"content-type:application/json\" -H \"apikey:WeavedDemoKey\\$2015\" https://api.weaved.com/v22/api/user/login/youraccount:::at:::email.com/your_weaved_password","name":""},{"language":"python","code":"import httplib2\nimport json\nimport datetime\nimport base64\nimport sys\nimport os\nimport getpass\nimport errno\n\nfrom urllib2 import urlopen\nfrom json import dumps\n\nfrom socket import error as socket_error\nimport socket\n\napiMethod=\"https://\"\napiVersion=\"/v22\"\napiServer=\"api.weaved.com\"\napiKey=\"WeavedDemoKey$2015\"\n\n#===============================================\nif __name__ == '__main__':\n\n    httplib2.debuglevel     = 0\n    http                    = httplib2.Http()\n    content_type_header     = \"application/json\"\n\n    userName = raw_input(\"User name:\") \n    password = raw_input(\"Password:\")\n        \n    loginURL = apiMethod + apiServer + apiVersion + \"/api/user/login\"\n\n    loginHeaders = {\n                'Content-Type': content_type_header,\n                'apikey': apiKey\n            }\n    try:        \n        response, content = http.request( loginURL + \"/\" + userName + \"/\" + password,\n                                          'GET',\n                                          headers=loginHeaders)\n    except:\n        print \"Server not found.  Possible connection problem!\"\n        exit()                                          \n#    print (response)\n    print \"============================================================\"\n    print (content)\n    print\n\n    try: \n        data = json.loads(content)\n        if(data[\"status\"] != \"true\"):\n            print \"Can't connect to Weaved server!\"\n            print data[\"reason\"]\n            exit()\n\n        token = data[\"token\"]\n    except KeyError:\n        print \"Comnnection failed!\"\n        exit()\n        \n    print \"Token = \" +  token\n"}]},"method":"get","params":[{"required":false,"desc":"User's Weaved account name","default":"","type":"string","name":"username","in":"path","_id":"55e4a018830ec32300e1a399"},{"type":"string","in":"path","_id":"55e4a018830ec32300e1a398","default":"","desc":"User's Weaved account password","name":"password","required":false}],"results":{"codes":[{"name":"","code":"\n\n    {\n        \"status\": \"true\",\n        \"token\": \"58c25787c5514d43ae1d53a571daafe1\",\n        \"email\": \"example@example.com\",\n        \"guid\": \"6BE2CB95-A2B9-4F22-A1D5-9148F932D613\",\n        \"service_token\": \"EBE7EBE7E4AD9F9CB4A68E8CBFE489BBBFA8BBBA9ABBB3B195BBA7FAECEEEFEBE4E8EDEBE9E8E8ECE7ECE8E7E4EBEAF0EFE7EDF0EFEFEAF0EFE6ECE4B8BFAB123457B0BBEFE7E6E79EA7BFB6B1B1F0BDB1B3E48E8C91E4ECEBE4EFE6EEEEE4EFEEEEE4ECE4EEE4EFE4B39D94BABF9A96A4\",\n        \"service_level\": \"PRO\",\n        \"storage_plan\": \"FREE_N\",\n        \"secondary_auth\": \"usfKaasdfAype6RNZV6Y9qrahmc=\",\n        \"apikey\": \"WeavedDemoKey$2015\",\n        \"auth_token\": \"58c25787c55143df67ac53a571daafe1\",\n        \"auth_expiration\": 1441651690,\n        \"service_authhash\": \"74AB5706338889D691232B88D4665BFA0BC6D32\",\n        \"developer_plan\": \"DEVELOPER\",\n        \"portal_plan\": \"free_plan\",\n        \"portal_plan_expires\": \"2038-01-01 00:00:00\",\n        \"service_features\": \"YWRzPTAsc2hhcmU9Mixjb25jdXJyZW50PTEscDJwZHVyYXRpb249MTgwMCxwMnBkYWlseT0xMDAwLGd1ZXN0PTA=\"\n    }\n\n","language":"json","status":200},{"name":"","code":"    {\n        \"status\": \"false\",\n        \"reason\": \"[0102] The username or password are invalid\"\n    }","language":"json","status":400}]},"settings":"","url":"/user/login/:username/:password"},"editedParams2":true,"excerpt":"Sign in to Weaved account","hidden":false,"isReference":false,"order":0,"updates":["57026e0fadbd340e00928b5e"],"project":"55dcd6a68a3dcd2300cc5f76","type":"get","link_external":false,"category":"55e49e35830ec32300e1a391","createdAt":"2015-08-31T18:37:56.771Z","editedParams":true,"githubsync":"","link_url":"","slug":"userlogin","sync_unique":"","__v":2,"version":"55dcd6a78a3dcd2300cc5f79","user":"55dcd49b0efd5821000d5358","title":"/user/login","body":"Before doing anything useful with the Weaved API, you need to be logged into your account.  This call will return a token that you need to use in other calls.\n\nThe keys returned from this call are defined as follows:\n\n**status **- true if called succeeded, false if it failed\n**token **- login token for this session\n**email **- your e-mail account\n**guid **- ???\n**service_token **- ???\n**service_level **- depends on subscription level you have selected\n**storage_plan **- indicates a storage plan, if any, associated with your account\n**secondary_auth **- ???\n**apikey **- apikey used for this call\n**auth_token **- ???\n**auth_expiration** - ???\n**service_authhash** - ???\n**developer_plan** - ???\n**portal_plan** - ???\n**portal_plan_expires** - expiration date for current Portal Plan\n**service_features** - ???","childrenPages":[]}

get/user/login

Sign in to Weaved account

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

username:
string
User's Weaved account name
password:
string
User's Weaved account password

Examples


Result Format


Documentation

Before doing anything useful with the Weaved API, you need to be logged into your account. This call will return a token that you need to use in other calls. The keys returned from this call are defined as follows: **status **- true if called succeeded, false if it failed **token **- login token for this session **email **- your e-mail account **guid **- ??? **service_token **- ??? **service_level **- depends on subscription level you have selected **storage_plan **- indicates a storage plan, if any, associated with your account **secondary_auth **- ??? **apikey **- apikey used for this call **auth_token **- ??? **auth_expiration** - ??? **service_authhash** - ??? **developer_plan** - ??? **portal_plan** - ??? **portal_plan_expires** - expiration date for current Portal Plan **service_features** - ???

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}