{"__v":1,"_id":"571f1b8bd8667f0e00a3c422","category":{"__v":0,"_id":"571699927256fb0e00c1d01c","project":"56130e29d2b2370d0096b91a","version":"56130e2ad2b2370d0096b91d","sync":{"url":"","isSync":false},"reference":true,"createdAt":"2016-04-19T20:48:18.215Z","from_sync":false,"order":0,"slug":"sites","title":"Reference"},"editedParams":true,"editedParams2":true,"parentDoc":null,"project":"56130e29d2b2370d0096b91a","user":"56f97c316dd61e2900ea2dc7","version":{"__v":11,"_id":"56130e2ad2b2370d0096b91d","project":"56130e29d2b2370d0096b91a","createdAt":"2015-10-05T23:56:26.509Z","releaseDate":"2015-10-05T23:56:26.509Z","categories":["56130e2bd2b2370d0096b91e","56130f638e503f0d00648b05","561317cdbe80130d00f188dd","561317d8ff92880d005ca212","56f97c0f8fef7520003f818e","570d751180c9010e00d77f4d","570d7543e2a0b40e0077aa90","571699927256fb0e00c1d01c","57f43db31592cb0e00761dd6","57f52ed668a53b2000e03efa","57f5350f485e6e2b005b2f27"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":true,"codename":"","version_clean":"0.0.0","version":"0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-04-26T07:40:59.060Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[{"language":"curl","code":"curl -X POST 'https://api.stacklighting.com/v0/oauth2/token' \\\n     -H 'Content-Type: application/json' \\\n     -d '{\"grant_type\":\"password\", \"client_id\":\"98f59d7a9d6379ed812e2b2444f87e89\", \"email\":\"darth:::at:::stacklighting.com\",\"password\":\"deathstar4eva\"}'"}]},"method":"post","results":{"codes":[{"name":"","code":"{\n\t\"token_type\": \"Bearer\", \n\t\"access_token\": \"YmE3MTU5MWItZTIwMC00MDc2LWmJZTQtZDH5YmUxMTA0ZTmNOjU3jNE2NzM5MzE1MjIwNDg=\", \n\t\"expires_in\": 76608\n}","language":"json","status":200}]},"settings":"","auth":"never","params":[{"_id":"57182986d34deb0e0064ba98","ref":"","in":"body","required":true,"desc":"The user's email address.","default":"","type":"string","name":"email"},{"_id":"5718299d495a500e004c01b2","ref":"","in":"body","required":true,"desc":"The user's password.","default":"","type":"string","name":"password"},{"_id":"572047ac9eaf522b007455ed","ref":"","in":"body","required":true,"desc":"The OAuth 2.0 grant type. Enter the string _password_.","default":"password","type":"string","name":"grant_type"},{"_id":"572047ac9eaf522b007455ec","ref":"","in":"body","required":true,"desc":"Your Client ID.","default":"","type":"string","name":"client_id"}],"url":"/oauth2/token"},"isReference":true,"order":0,"body":"","excerpt":"This endpoint returns a user's access token.","slug":"oauth-20","type":"endpoint","title":"OAuth 2.0"}

postOAuth 2.0

This endpoint returns a user's access token.

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Body Params

email:
required
string
The user's email address.
password:
required
string
The user's password.
grant_type:
required
stringpassword
The OAuth 2.0 grant type. Enter the string _password_.
client_id:
required
string
Your Client ID.

Examples


Result Format


User Information

Try It Out

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