API header applicacionaccesskey

integrations
(juan) #1

Hello, I am using webhook to integarate the app with our CRM, but the webhook setting page of my CRM does not have a place to specify headers, so i am getting the error applicationaccesskey is mising. can i place the header on the url address, if so how is the syntax.

(Levent Kulacoglu) #2

@jujogar10
Can you try with:

YourAPI_URL?applicationAccessKey=yourkeyhere
(juan) #3

this is what i have

https://api.appsheet.com/api/v2/apps/f692d2e3-97xxxxx/tables/muestras/action?applicationaccesskey=sr4OE-jvBND-hIVLl-3L2qU-Z0Ih3-9AxjG-xxxx

and is not working

(Levent Kulacoglu) #4

@jujogar10
it should be applicationAccessKey explicitly not applicationaccesskey

(juan) #5

Thanks for your prompt answer, I have fixed the upper case but still gets the error

(Levent Kulacoglu) #6

@jujogar10
Can you try with this one pls? Sorry to bother you

API_URL/?headers={'applicationAccessKey': XXXX}
(juan) #7

No bother at all, this way I learn.

It didn´t work.

(Levent Kulacoglu) #8

Chiming in @Phil, he will re-direct you better I believe

1 Like
(Philip Garrett) #9

If you wish to invoke the AppSheet API from your CRM you need to specify the ApplicationAccessKey in the HTTP header of the Post.

If you cannot specify headers using your CRM service, I am not sure how you can invoke the AppSheet API directly. There may be a way to specify the headers in the URL, but if so, I am not aware of it. I am no expert on HTTP so hopefully someone else in the community may have a suggestion regarding that.

You might be able to invoke the AppSheet API indirectly, by having your CRM invoke Zapier, and having Zapier invoke the AppSheet API. Our Zapier code includes the headers when calling the AppSheet API.

(juan) #10

Thanks phil for your answer, can the header be included on the json string that is being posted?

(Philip Garrett) #11

No, it must be in the header.

(Levent Kulacoglu) #13

@Phil,
All the solutions I have provided for @jujogar10 is actually how headers can be passed in the POST URL. I have tested them all with Postman but none of them had worked and I have received the same error message stating that applicationaccesskey is missing though it was there with any possible form i.e.

https://api.appsheet.com/api/v2/apps/f692d2e3-97xxxxx/tables/muestras/action?applicationaccesskey=sr4OE-jvBND-hIVLl-3L2qU-Z0Ih3-9AxjG-xxxx

https://api.appsheet.com/api/v2/apps/f692d2e3-97xxxxx/tables/muestras/action?apikey=sr4OE-jvBND-hIVLl-3L2qU-Z0Ih3-9AxjG-xxxx

https://api.appsheet.com/api/v2/apps/f692d2e3-97xxxxx/tables/muestras/action?{'applicationaccesskey': 'sr4OE-jvBND-hIVLl-3L2qU-Z0Ih3-9AxjG-xxxx'}

I believe the solution lies under how AppSheet evaluates/stringifies the webhook workflow rule params, but we are not aware of that.

(Steve Coile) #14
https://api.appsheet.com/api/v2/apps/f692d2e3-97xxxxx/tables/muestras/action?applicationaccesskey=sr4OE-jvBND-hIVLl-3L2qU-Z0Ih3-9AxjG-xxxx

https://api.appsheet.com/api/v2/apps/f692d2e3-97xxxxx/tables/muestras/action?apikey=sr4OE-jvBND-hIVLl-3L2qU-Z0Ih3-9AxjG-xxxx

https://api.appsheet.com/api/v2/apps/f692d2e3-97xxxxx/tables/muestras/action?{'applicationaccesskey': 'sr4OE-jvBND-hIVLl-3L2qU-Z0Ih3-9AxjG-xxxx'}

All of these are HTTP GETs, not POSTs.

(Levent Kulacoglu) #15

@Steve
When calling an API, authorization params are passed in the header. There are 2 types of authentication:

  • Basic auth: basic authentication with username & password
  • API key: passing the required API key in the header

What AppSheet API uses is API key authentication and that’s an HTTP POST, not a GET request. With GET request with the same structure, - depending on how the API is set - you either get a 401 or 403 error from the server.

Provided you want to get more information on REST/SOAP services, I can advise some good resources for reading.

(Philip Garrett) #16

I have enhanced the API to allow you to specify the ‘applicationAccessKey’ in the HTTP Query String.
This change will be released on Monday afternoon May 13, 2019 Seattle time.

See this article for the details. https://help.appsheet.com/integrations/api/invoking-the-api

3 Likes
(juan) #17

In the article, the word Action is twice on the url, is this correct?

https://api.appsheet.com/api/v2/apps/{appId}/tables/{tableName}/Action/Action?applicationAccessKey=bA2SK-l5kzd-SdvFb-mqIe6-gBT8a-CXp3D-cjCYB-oiJ6U

(Philip Garrett) #18

Sorry that was my mistake. I have updated the article.

Thanks for reporting this.