발급받은 토큰은 하루만 사용할 수 있는데 기간을 연장하려면 refresh_token, client_key, client_secret 를 사용해서 갱신해야한다 아래는 함수이다. def reNewToken(refresh_token,client_key, client_secret): url = "https://open.tiktokapis.com/v2/oauth/token/" payload = { 'client_key': client_key, 'client_secret': client_secret, 'grant_type': 'refresh_token', 'refresh_token': refresh_token } headers = { 'Content-Type': 'application/x-www-form-urlencoded', 'Cache-Control': 'no-cache' } try: # POST 요청 실행 # data 파라미터에 딕셔너리를 넣으면 자동으로 application/x-www-...
원문 링크 : 파이썬으로 틱톡 토큰 갱신하기