Sign in | Sign up

Error 401 (Unauthorized)

Tagged:

Currently contains 3 posts

Avatar

December 09, 2017 08:12

Edel

I am currently trying the search instant in v2 of the nutritionix api but I am getting some errors.

Here is my sample GET request
GET https://trackapi.nutritionix.com/v2/search/item?query=pork?x_app_id=0000&x_app_key=0000

And it gives me error 401 (Unauthorized)

How can i solve this problem?

Avatar

November 15, 2019 17:18

harsimranb

As per documentation, app id and app key should be passed in the headers: https://docs.google.com/document/d/1_q-K-ObMTZvO0qUEAxROrN3bwMujwAN25sLHwJzliK0/edit#heading=h.gz6pu9o7f9iz

Avatar

June 04, 2020 17:20

srenert

I’m using the “v2/search/instant” endpoint and I’ve supplied the following headers
x-app-id: 6fc444f6
x-app-key: {{ app key issued from developer.nutritionix.com }}
x-remote-user-id: 0

I’m getting the following response…..

{
“message”: “unauthorized”,
“id”: “e0942f63-88d7-44ff-87c9-6d7e9a9dbaa1”
}

Reply to thread