Skip to content

How to generate the link public token? #105

@Schachte

Description

@Schachte

I'm looking in the docs and wondering how we actually generate the link public token. I was reading the integration tests, but seem to be missing a trivial idea here..

Response<ItemPublicTokenExchangeResponse> response = plaidClient.service()
    .itemPublicTokenExchange(new ItemPublicTokenExchangeRequest("the_link_public_token")).execute();

I see that I can create something maybe using the following, but not sure where the params are documented to generate this successfully:

        Response<ItemPublicTokenCreateResponse> createItemResp =
                plaidClient.service().itemPublicTokenCreate(new ItemPublicTokenCreateRequest(createItemCreateResponse(plaidClient).getAccessToken())).execute();

I've done pretty much a replication of the abstractintegrationtest file to build up the token call.

    public ItemCreateResponse createItemCreateResponse (PlaidClient client) throws Exception {
        Response<ItemCreateResponse> response =
                client.service()
                        .itemCreate(new ItemCreateRequest(
                                "ins_109511",
                                Arrays.asList(Product.INCOME))
                                .withCredentials("username", "user_good")
                                .withCredentials("password", "pass_good")).execute();
        return response.body();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions