post https://slemma.com/api/v1/auth-service/
Generates temporary user tokens for individual users.
Returns
Returns a new temporary user token for this user. This temporary token is valid for only 5 minutes.
Warning
User Token must be kept secret and transferred only over SSL, as it's effectively as good as a user's email and password.
The following are the examples of HTTP status codes including errors that API can generate
Response codes | Response content | Description |
---|---|---|
200 OK | e111f69d-9dd0-89c7-a8b3-86200f9421f3 | Everything worked correctly. Temporary token has been retrieved. |
401 Unauthorized | sig is empty | Missing required 'sig' header |
401 Unauthorized | teamid is empty | Missing required 'teamid' header |
404 Not Found | Object not found | User with this UserKey not found. |
Using temporary token
For authorization in Slemma use the Java script to send a POST request to a specific dashboard (for example, https://slemma.com/infographics/634862) with the received temporary token (parameter name is 'token') and team identifier (parameter name is 'teamid').
<form action="https://slemma.com/infographics/634862" target="_blank" method="POST">
Team ID
<input type="text" name="teamid">
<br/>
Temporary token
<input type="text" name="token">
<br/>
<input type="submit">
</form>
After successful authorization, the target dashboard will open.