def filter_access_token(interaction, current_cassette):
 request_uri = interaction.data['request']['uri']
 response = interaction.data['response']
 if (('api/v1/access_token' not in request_uri) or (response['status']['code'] != 200)):
  return
 body = response['body']['string']
 try:
  token = json.loads(body)['access_token']
 except (KeyError, TypeError, ValueError):
  return
 current_cassette.placeholders.append(betamax.cassette.cassette.Placeholder(placeholder='<ACCESS_TOKEN>', replace=token))

def filter_access_token ( interaction , current_cassette ) : request_uri = interaction . data [ 'request' ] [ 'uri' ] response = interaction . data [ 'response' ] if ( ( 'api/v1/access_token' not in request_uri ) or ( response [ 'status' ] [ 'code' ] != 200 ) ) : return body = response [ 'body' ] [ 'string' ] try : token = json . loads ( body ) [ 'access_token' ] except ( KeyError , TypeError , ValueError ) : return current_cassette . placeholders . append ( betamax . cassette . cassette . Placeholder ( placeholder = '<ACCESS_TOKEN>' , replace = token ) )
add betamax placeholder to filter access token .