GET Tokens Response missing most of the Token's fields

Hi, I'm using Personal Access Token to retrieve a list of the particular user's tokens and only retrieve the token names.
What could be the problem?

{
"count": 3,
"token": [
{
"name": "dsadasd"
},
{
"name": "token1"
},
{
"name": "token2"
}
]
}
0
4 comments

Also tried Basic Auth, nothing changed :(

0
Avatar
Fedor Rumyantsev

Hello,

This is expected behavior - you may not retrieve the token string itself as it is only shown once when the token is created. You may check the token creation timestamp and permissions if the token is limited, though:

/app/rest/users/<user locator>/tokens?fields=token(name,creationTime,permissionRestrictions(permissionRestriction(isGlobalScope,permission(*))))
1

@..., thanks for the answer, of course, I know that I wouldn't able to retrieve the actual token, but I needed only the metadata and you request fits perfectly, thank you very much :)

0
Avatar
Fedor Rumyantsev
Glad to hear this helped, you are most welcome!
Please have a great day.
0

Please sign in to leave a comment.