Can not authorize API while using all correct information can you help me?


#1


#2

having same problem and posted an earlier thread with details/screen shots, is there any hope? it is not even working from your ‘own’ API explorer using all right credentials using both “APP API, OAUTH Token”


#3

Hi @dharm_softobiz, @karimk, are you guys able to tell me exactly which API and endpoint you got these errors with? I’m trying to investigate this further but can’t replicate the issue.

Also, have you tried using apikey instead of oauth 2 for authentication type?

Thanks,
Alex


#4

hi @alejandro.felman

I’ve tried a couple of end points which I have an application access over it, take this one for example

https://api.transport.nsw.gov.au/v1/gtfs/alerts/Ferries (Tried with API Key, OAuth2)

below are detailed steps as well
sign in
create an app
add the APIs you need for that app
go to API Explorer
choose the API and App/API Key
Choose OAuth2 as the auth type
Choose Client Credentials
API Key and Shared secret are prepopulated for you
Type in “user” to the Scope
add in the Token Endpoint (use this one https://api.transport.nsw.gov.au/auth/oauth/v2/token5 if you don’t have one)
Choose the API endpoint
Click on Submit
Grab the curl command and run it


#5

Hi @karimk, this seems to be working fine for me when using apikey and hitting submit on the api explorer for the ferries endpoint. Also works correctly using curl. Can you please try again making sure you follow the steps on our user guide page - https://opendata.transport.nsw.gov.au/site/en_us/gs-intro.html


#6

Hi @alejandro.felman, can you try using my API key then, I’ve tried again and still not working, I am sure I am doing everything as mentioned

I’ve sent to you the command in a private message “Curl command” including my API key


#7

Hi @dharm_softobiz, have you got this to work now? I’ve worked it through with @karimk and now it works. It was just a matter of having the right command, especially including “apikey” before the API key. Let me know if you need further help, you can private message me the command you’re using if you like for me to take a look at it.

Thanks,
Alex