External API request + encoding questions

Options
Hello Friends,
Apologies in advance if my questions are irrelevant but I am trying to integrate my app with the external devices and keep on getting 401 error on auth.

To xano team: great job on the encoding part, it is super helpful, however some documentation would help newbies like me.

1) External API seems to add some lines to header automatically - not sure if this causes any issue but is there are way to avoid it as my integration partners defines header auth very accurate - below what i mean:


That's my header variable I am concatenating as per partner docs: 
[Screen Shot 2021-10-22 at 4.08.09 PM.png]That how I am inputing it to the external API function call:[Screen Shot 2021-10-22 at 3.55.00 PM.png]That's what is sent by Xano(it adds some lines to my header)
[Screen Shot 2021-10-22 at 3.51.04 PM.png]Again not sure if this is causes any issues, also I noticed that "Authorization" is lower-cased - not sure how this happens. Sorry if the questions are irrelevant.

2) Url-encode filter: is the same as percent encoding and matches this paremeter encoding process?
[Screen Shot 2021-10-22 at 1.01.12 PM.png]

Comments

  • Lukasz Kwiatkowski
    Options
    This has been partially resolved. Not deleting - maybe other users would have similar query.

    1) The extra lines in the header do not collide with my API
    2) Url-encode is the same as paramenter (percent) encoding in auth 1.0 library 

    sorry and thanks 
  • Michael Udinski
    Michael Udinski Administrator

    ADMIN

    Options
    Hey  - which piece is still unresolved that we can help try to resolve or point you in the right direction with?
  • Lukasz Kwiatkowski
    Options
    Thanks 
    Basically I was able to set up the initial auth but now I am not able to sign my requests, keep on getting 401. As my encoding syntax and values matches everything provided in the documentation of the integration partner, my only hypothesis is that Xano header does not go through.
    I found a function that allows customizing s header but first I do not know if this is relevant, second I do not know how to use it.
    So this is header sent by Xano and this is header pattern from the partner tool - not sure if discrepancy can be the root cause of my error and not sure if I can made external API call header looks alike with the "customized header" function available in Xano.

    This is what Xano sends:
    [Screen Shot 2021-10-24 at 10.16.30 PM.png]
    This is the pattern provided:
    [Screen Shot 2021-10-24 at 9.48.11 PM.png]
  • Lukasz Kwiatkowski
    Options
    is there any way of customizing this header  
  • Michael Udinski
    Michael Udinski Administrator

    ADMIN

    Options
    The Http Header function allows you to set a custom header of the Xano API from within you are working on. It looks like you are talking more about the headers of an external API. You can set headers on the external API request function using the push filter and writing in the value (https://docs.xano.com/working-with-data/functions/external-api-request#manually-build-an-external-api-request)... however, that is typically done when the call to that API requires you to do so. Anything else you get back will be the request/response headers from that provider
  • Michael Udinski
    Michael Udinski Administrator

    ADMIN

    Options
    But you should be able to manipulate that header that comes back... I might recommend the Array: Find First Element function to isolate what you want to update then and Update Variable function