linka header logo

Tokens? Why need this?

For the security in the platform, tokens is a easy implementation for your instance

to make a request you need a token to identify you

How to generate a token?

To generate a token with the Sdk:

        
            from Linka import LinkaSdk
url = "https://example.com"
data = {
"username":"example",
"password":"123456"
}
token = LinkaSdk.new_session(url, data)

See? this is very simple

How to generate with http

to create a token with a http request you need this

this example use python and the lib requests

        
            import requests
url = "example.com"
login = {
"username":"example",
"password":"123456"
}
token = request.post(url + "/new-session",json=login)

The token like this:6bde5c9a6e16d2e7aadf7c0d1719aaaa