agt method

Future<String> agt({
  1. String? clientId,
  2. String? accessToken,
})

Issues temporary agt (access token-generated token), which can be used to acquire auth code.

Implementation

Future<String> agt({String? clientId, String? accessToken}) async {
  final tokenInfo = await _tokenStore.fromStore();
  final data = {
    "client_id": clientId ?? KakaoContext.platformClientId,
    "access_token": accessToken ?? tokenInfo.accessToken
  };

  return await ApiFactory.handleApiError(() async {
    final response = await _dio.post("/api/agt", data: data);
    return response.data["agt"];
  });
}