Is there a fixed string length to an AGOL token or does it vary every time generateToken is called via REST?
If not can the token, ssl, and expiry field and quotes be removed from the response?
The AGOL token is a text string of consistent length. I would use the python json module for extracting the token and other items in the response. If you are using another method to extract the token, it will be quoted string following the word token. If you use f=json, you will get json without formatting which may make it easier to parse.
Even with f=json I still get this:
I'm hoping to rekindle this thread. Was there a solution for this? I'm having exactly the same issue whereby I want to extract the token itself, and none of the text either side of it in the response.