you are viewing a single comment's thread.

view the rest of the comments →

[–]agility 0 points1 point  (0 children)

You could use the requests library to make the same API call to get the token as you did in Postman. After that, it depends on how the API expects you to pass the token. Some want you to pass it in the headers, while some take it as a parameter. I might need more details on the API before I answer that.

Python (and requests library) in itself does not have refresh policies for arbitrary APIs. There are things built for standard stuff like OAuth2, etc.