question

zeinab.dashti.bankify avatar image
zeinab.dashti.bankify asked

401 Error while accessing Account API

We are trying to access Account Information (US) (1.1.1) using Authorization code under auth 2.0 but it gives 401 error code. I did it previously with Person To Person Payment API and I have got the response. Although I followed up the same instruction in Account API too and got access token but I can not get data from this API.

As an example I got 401 error code for

GET {
  {APIMUrl}}/{
  {b2cAccount}}/{
  {version}}/accounts

Best Regards,

Zeinab Dashti

accounts b2c
10 |600 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Szymon Patacz avatar image
Szymon Patacz answered

Dear Zeinab,

Thank you for the question. Account Information (US) (1.1.1) API is working correctly with B2C authorization. I assume you didn't had any problems receiving token but issue appears when sending GET request. Such issue can appear when token is invalid. Please check if described API is added to your application created in developer portal: https://developer.fusionfabric.cloud/

If it is missing you can edit existing application or create new one for the specific API.

Please also be advised that tokens have expiration time, after which you need to get new access token:

I hope this solves any issues you have encountered, but if the problem persists please share with us your Application Id taken from https://developer.fusionfabric.cloud/ .


Best Regards,

Szymon Patacz


1597824761296.png (26.9 KiB)
2 comments
10 |600 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Dear Szymon,

Thank you for you support. As I checked, the API is added to my application. I've also delete the application and have generated another one but the issue is not fixed yet. As I said, I have received the token successfully but I can not get data. Could you please check my application with this ID:

b2408f3b-f551-49aa-a757-cd2182c0f9d9


Best Regards,

Zeinab Dashti

0 Likes 0 ·

Dear Zeinab,

Unfortunately in case of incorrect token I am unable to filter logs to specific AppID as it is not yet authorized.

Could you check if authorization data is sent from you in Headers instead of Request URL? I have noticed that there were recently some calls containing token in Request URL which would cause the same problem as you described.

Screenshot from configuration where this parameter can be changed in postman:

Another thing, please check if you are using B2C API, as Account information have 2 separate APIs available - B2C and B2B.

Best Regards,

Szymon

0 Likes 0 ·
1597913966936.png (21.3 KiB)