Closed kenlane-af closed 1 week ago
Hi @kenlane-af
Thanks for raising, I think this should help:
curl --location --request POST 'https://app.bic-boxtech.org/api/v2.0/oauth/token' \
--header 'Accept: application/json' \
--header 'Authorization: Basic ZGF2aWRAY...'
if your using postman then in the 'Auth' tab set the auth type to Basic Auth
and enter your Boxtech Username and Password in the boxes provided, otherwise you will need to base64 encode separating the username and password with a :
, the output will look like above, just make sure the full authorisation is provided in place of ZGF2aWRAY...
curl --location 'https://app.bic-boxtech.org/api/v2.0/codes/MNBU' \
--header 'Accept: application/json' \
--header 'Authorization: eyJraWQiOiJUVW9vRTd...'
make sure you put the full token returned from the auth endpoint in the above code to replace eyJraWQiOiJUVW9vRTd...
you will get a response as below
[
{
"code": "MNBU",
"name": "MAERSK A/S",
"address": {
"country": "Denmark"
}
}
]
I have the same problem. I can get the token from authenticate endpoint, apply it on the authorization header on BIC Code endpoint and the result is a <!doctype html>
This happens even if I do in the website
We are having the same issue as @ceciliamarquesb
The swagger and API are returning successfully, so we will look into your accounts to see if some permissions have not been set,
Could you please login to https://portal.bic-code.org using your credentials and ensure you have accepted the terms and conditions for the BoTech
api please? the T&C's
button should be green not red like below.
Here's the swagger response showing results.
@declanoconnor can you check over this also please?
@cmsdroff well that did it! Thank you for the quick reply!
Would it be possible to give some response on the API that gives an indication if the T&C have not been accepted?
@cmsdroff well that did it! Thank you for the quick reply!
Would it be possible to give some response on the API that gives an indication if the T&C have not been accepted?
Thanks for the feedback @tvanhove
The API should now return an appropriate response & other permission errors should now be clearer.
The swagger and API are returning successfully, so we will look into your accounts to see if some permissions have not been set,
Could you please login to https://portal.bic-code.org using your credentials and ensure you have accepted the terms and conditions for the
BoTech
api please? theT&C's
button should be green not red like below.
Here's the swagger response showing results.
@declanoconnor can you check over this also please?
Thank you @cmsdroff
Issue solved!
I am able to retrieve my auth token and submit a curl GET for a BIC Code, but the API returns some <!doctype html> data and I cannot see the JSON output described in the documentation.
I've tried with both curl and Postman and tried tweaking the "Accept" parameters. I notice an error from Cloudflare but I am sure it is something more simple than that. Here is the erbose curl output:
kenneths-mbp:~ kennylane$ curl -v --location 'https://api.bic-boxtech.org/api/v2.0/codes/MNBU' --header 'Authorization: '