Have you succeeded in getting an API token and authenticating using that?
I think I have done that correctly. I created the API Key in the gateway. Stored it securely. Then used it in Postman. I have tried a key that requires secure connections and one that doesn’t.
I am using Postman:
- POST HTTP request
- http://localhost:8088/data/api/v1/tags/import as the url
- X-Ignition-API-Token as the custom header/authorisation key. My API Key as the value.
- Body is set to raw JSON
- I have exported tags from a project into a JSON file. Then copied that text into my JSON body of my Postman request.
- I have tried filling out the Params that are required in the API documentation too.
I am getting a HTTP ERROR 401 Unauthorized.
Any help is much appreciated. Thanks.
Unauthorised would suggest that you don't have the token set up quite right. Can you screenshot the postman settings you use?
So you are validating SSL certificates on a non SSL connection? Is this intentional? Maybe remove any SSL or HTTPS settings and try it and see if its the same error? 401 suggests missing authentication.
Whoops I was copying the API Key wrong. I was copying the part that came after “API_Key_Name:” thinking that part wasn’t included. After using the right API key I got a 403 forbidden error. I just had to allow authenticated users to be able to write to the gateway and that resolved it. All working now. Thanks heaps for your guidance! Sorry I’m a noob




