I am trying to use Curl in a batch task to send in a claim. my line is:
curl --cert nzhealthca.pem -d @test1.txt https://provider.api-compliance.acc.co.nz/api/v2/claims --header "Accept-Encoding: gzip,deflate&key: xxxxxxx&Content-Type: application/json&Content-Length: 1507&Host: provider.api-compliance.acc.co.nz&Connection: Keep-Alive&User-Agent: Apache-HttpClient/4.1.1 (java 1.5)"
It keeps giving the fault "Failed to resolve ApI Key variable request.header.apikey" (which I've replace above with 'xxxxx').
I'm new to this, so would appreciate any assistance.
Thanks
Dave Johnston
Greetings Dave
Greetings Dave
Give this a try:
curl --cert nzhealthca.pem -d @test1.txt https://provider.api-compliance.acc.co.nz/api/v2/claims --header "Accept-Encoding: gzip,deflate&apikey: xxxxxxx&Content-Type: application/json&Content-Length: 1507&Host: provider.api-compliance.acc.co.nz&Connection: Keep-Alive&User-Agent: Apache-HttpClient/4.1.1 (java 1.5)"
Cheers.
Steven
Interestingly it is an
Interestingly it is an identical response. I tried bringing the key in after the Certificate - with '--apikey' Curl faults, and with '--key' I get exactly the same error of the apikey. It's as if the key is being totally ignored.
The key does seem to be being ignored
I made the key 'xxxxx' and got the same response. So for some reason the key value is being totally ignored by the ACC site.
Hi Dave
Maybe this might work:
curl --cert nzhealthca.pem -d @test1.txt https://provider.api-compliance.acc.co.nz/api/v2/claims --header "Accept-Encoding: gzip,deflate&apikey: xxxxxxx&Content-Length: 1507&Host: provider.api-compliance.acc.co.nz&Connection: Keep-Alive&User-Agent: Apache-HttpClient/4.1.1 (java 1.5)"
Leon
Thanks Leon
Exactly the same response I'm afraid. I've moved it to just after the certificate as --key and it responds just the same. It is as if it doesn't see the key at all.
Steven and Leon thanks
I made it 'apikey:' as you suggested. But I also moved that bit to the very beginning of the header. Now I get 'Invalid API Key'. Though it is definitely my API Key for this. Not sure if that is an improvement or not. Any ideas?
Thanks
Hi Dave
Hi Dave
I've made a change on my end. Can you try again?
Cheers.
Steven
Invalid API Key
Now I get 'Invalid API Key'. I am getting this error how to resolve this.
Hi pkoval
Can you provide us which app you are using when this error comes up? Also which endpoint you are trying to aim?
Thanks
Leon
Invalid API Key
Hi Leon ,
Created New App MyApps -> Query Invoice Compliance
Scenario: Query Invoices -> Invoices/list_of_submissions in the portal.
After the using the API key given in the ACC Developer portal getting the below error.
{ "code": 401, "reason": "The API Key is not valid for this resource" }
Hi pkoval
Thanks for telling us this. Your procedures looks fine, so we need the following information so that I can indentify and adjust in our backend:
Or you can try use the API key that you are submit the invoice, it should be also work for query the invoice.
Thanks,
Leon
Hi Leon,
App Name: Query Invoice
API Key: TuPql1
Created Date:Wed, 14/11/2018 - 21:36
End Point URL:https://provider.api-compliance.acc.co.nz/api/v2/claims/vendors/submissions
Hi pkoval
Thanks for provide us those info. I've tested your API Key and it works fine on my end. But I also adjusted some changes in your app, so can you please give it another try, and make sure you include your API Key in the header of your submission.
Thanks
Leon