Get Image Card

Endpoint: BASE_URL/baas/debit-cards/:id/image

circle-exclamation

To obtain the card image, you must generate a card type token in the AWS URL that Galileo will provide you. You can read more about this in herearrow-up-right.

To generate tokens, we have this function, where you need to pass as a parameter the account number and the type of token that you want to generate to the account.

private async getAccessToken(
    accountNumber: string,
    tokenType: GalileoTokenType,
  ): Promise<GetAccessTokenResponse> {
    const data = this.createRequestParameters({
      accountNo: accountNumber,
      type: tokenType,
    });
    const result = await this.sendRequest<GetAccessTokenResponse>(
      '/getAccessToken',
      data,
    );
    this.galileoParsers.handleError(
      result.status_code,
      result.status,
      result.errors,
    );
    return result;
}

The types of tokens you can generate in Galileo are:

  • Card.

  • Account.

  • Customer.

In the src/baas/galileo/enums/token-type.ts file, you can see an enum with the types of tokens, and the value that each one represents in Galileo.

Once a card type token is generated, it must be sent as a parameter in the AWS URL.

Linker example response:

Last updated