Andrija,     What you can do is try manually running cURL   For example.    [root[NAME] ~]# Auth=$(curl -k -d '{"username":"admin","password":"password"}' -H 'Content-Type: application/json' [URL] 2>/dev/null | grep "accessToken" | head -1)[root[NAME] ~]# echo $Auth"accessToken" : "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyTmFtZSI6ImFkbWluIiwicm9sZSI6IlNDR0FkbWlucyIsInJlcXVlc3RpbmdJUCI6IjEwMC45Mi4yMDQuMjI0IiwiYXBwTW9kZSI6IkFQUExJQU5DRVMiLCJhcGlVc2FnZU1vZGUiOiJSZXN0IiwiaW5zdGFuY2VJRCI6ImI1dk1IbC9iRk5Ld0FmMkpqQUpzQjRURXVxQURsZmF5NGVHWHNXNWZOUDl0WFpPYVhzemdCS0c0YXdJdlU1OEpWUXdxbnVpNnpDNnRLWkpWeVE1UWVRPT0iLCJ0b2tlblR5cGUiOiJBQ0NFU1MiLCJ1dWlkIjoiNTE1OTcwZGItMjVjMi00YmY1LWIwNDQtZWE2NmE0MGNlNGJhIiwiaWF0IjoxNjY2MTk1OTk4LCJleHAiOjE2NjYxOTc3OTh9.jT2W1LfDfK--DRHvGMATQ1Nh_cIm9wHqMbxCpLMg1ok",  
Hi, I am trying to use python and its requests lib to automate some tasks of assigning devices to specific groups.I have looked at the documentations ([URL] this does not work.When i try to request a token with the way they refer to (Authenticate user by generating a JSON Web Token (JWT))It just complains that my header lacks "authentication" headers.here is what my test code looks like:                  get_token() Results:                 basic_auth() Results:                 basic_auth2() Results:                 None of the methods work and the documentation seems to be wrong about sending the credentials via the body since it only seems to care about my authentication header. To summarize my main questions.1. Which method is the right one?2. What am i missing?3. In the first method the secret key in the jwt.encode(key=?).. Where do i get that from or what is that? Im not familiar with jwt's..
Secure Connect Gateway 5.12 rest API authentication not working