I'm setting up a POST request to an API. The service which has the API i'm integrating with is only giving me the following information:
HTTP Method: POST
API URL: https://websiteservice.com/api/v2
API Key: My API Key
Response format: JSON
Then it has two parameters:
key --> My API Key
action --> services
So I set it up in postman, and got an 200 response, but the correct return json data did not get returned.
How should I be setting this up in postman properly?
Related
I am building a intergration in Zapier (not a ZAP) to retrive dat from Monday.com Monday uses an API key that is required to be passed in the header to authenticate requests.
In Zapier developer I have set up the authentication as API Key. I have set up a field api_key for the user to add their key.
I have set up the test get request and in the HTTP Headers tab have added the api_key
When I send the reqest authentication fails with the folloaing error
authentication failed: The app returned "Not Authenticated". What happened (You are seeing this because you are an admin): Stack trace: ResponseError: {"status":401,"headers":{"content-type":"application/json; charset=utf-8"},"content":"{"errors":["Not Authenticated"]}","request":{"url":"https://api.monday.com/v2?query=%7Bme%7B%7D%7D"}} at
The Authentication code is
I think the issue is that you are sending API key as api_token header.
You need to send this API key as "Authorization" header of your request to monday.com.
example
I am using Google Cloud Endpoints with JWT Authorization and I am trying to Upload File from API.
There is no Issue with JWT as it is already working correctly with all other types ex. [application/JSON].
API POST Call (api/document/processrequest) with Content Type as multipart/form-data is saying Bad Format Response from Google Endpoints for Same Token.
API Post Call (api/document/processrequest) with ContentType (application/JSON) have no issues.
Is Google Cloud Point not supporting multipart/form-data?
Authorization Token is passed in Header. Authorization: Bearer [Token]
Everything works fine in Localhost/Development Environment without Endpoint.
Error Generated In Stackdriver Log:
Firebug error sample call:
Firebug success sample call with application/json:
I have specified application/JSON and multipart/form-data both in openapi specification.
Endpoints does not support multipart/form-data.
We have an API that we would like to try connecting with the Amazon API Gateway. I've been trying some very basic calls, but to no avail. For example, if we don't pass any authentication data in the query strings during the GET call using Postman:
GET https://<host>/<resource>
Then I correctly receive an error message:
{
"error": "Invalid authentication key",
"errorcode": 0
}
In the Gateway I have the following settings for the method:
Method Request
No Authorization, API Key not required
Some query string parameters which are not being set in either Postman or the API Gateway call
No request headers
no request models
Integration Request
HTTP Proxy Integration type, GET
Endpoint URl is the same URL I call using Postman above
No parameter, header or body mappings
Integration Response
Single 200 OK passthrough
Method response
Various HTTP Statuses
Response model as per our API's Swagger definition
All other methods have mock integration. Calling the method via Postman at our backend domain works as intended (i.e. gives the error message above).
Calling the deployed API Gateway method, however, results in:
"message": "Unknown endpoint error." if done using the Method Test in the API Gateway
"message": "Internal server error", if called from the browser or Postman.
Has anyone experienced this issue before?
EDIT: I just noticed that one of the response headers that are set when using Postman or Browser is:
X-Cache: Error from cloudfront
The docs says that this errror is set if the origin server returns an expired certificate, an invalid certificate or a self-signed certificate, or if the origin server returns the certificate chain in the wrong order, but our certificate is valid and I cannot note and problems with the certificate chain...
I have added api_key to my rest api in aws api gateway for authenticating a GET request method.
My request is:
curl -X GET -H "x-amz-key: XXXXXXXXXXXXXXXXXXXXXXQklq4C7vbEGprA" "https://XXXXXXXXXXX.execute-api.ap-northeast-1.amazonaws.com/test/10/12/+"
I keep getting the following error:
{"message": "Forbidden"}
I am doing everything as the AWS docs mention. Can anybody point me to the right direction here, how to add api_key in request?
The same request works fine if api_key authentication is removed.
The name of the attribute is x-api-key not x-amz-key
From the doc
Callers must now add to each call a custom header named x-api-key,
along with the value of the API key. For example, if the API key value
is bkayZOMvuy8aZOhIgxq94K9Oe7Y70Hw55, the custom header would be as
follows:
x-api-key: bkayZOMvuy8aZOhIgxq94K9Oe7Y70Hw55
I am building a program that will list albums/folders and images from my Amazon Cloud Drive. I am able to authenticate and get a token by following the instructions here at amazon public apis.
I am having trouble with the next call to get my endpoints described here under Account API.
Using get
GET : {{metadataUrl}}/account/endpoint Gets the customer end-point against
which REST queries will be executed.
So my request looks just like this in fiddler and on my site just like it is described on the Amazon site here under Get Endpoint. The only differences is the token for obvious reasons.
Sample Request:
GET /drive/v1/account/endpoint HTTP/1.1
Host: drive.amazonaws.com
Authorization: Bearer
Atza|IQEBLjAsAhQ5zx7pKp9PCgCy6T1JkQjHHOEzpwIUQM
My response is:
{
"message":"Authorization header requires 'Credential' parameter.
Authorization header requires 'Signature' parameter.
Authorization header requires 'SignedHeaders' parameter.
Authorization header requires existence of either a 'X-Amz-Date'
or a 'Date' header. Authorization=Bearer"
}
What I am expecting:
{
"customerExists": true,
"contentUrl": "https://content-na.drive.amazonaws.com/cdproxy/",
"metadataUrl": "https://cdws.us-east-1.amazonaws.com/drive/v1/"
}
I did find some information about building the objects in my response from amazon, however, it's not listed in the documentation on the amazon developer site. Is this something new that has not been updated in the docs or am I doing something wrong?
I had a new line between Authorization: Bearer and my token Atza|IQEBLjAsAhQ5zx7pKp9PCgCy6T1JkQjHHOEzpwIUQM. After removing the new line my issue was fixed..