athenahealth / apiserver-athenaFlex

Software developers can use sample code and documentation to use athenahealth's athenaPractice/athenaFlow FHIR API Server.
https://mydata.athenahealth.com/home
17 stars 7 forks source link

Trying to authenticate against client server. Getting: Not authorized at practice level. #305

Closed bobby-beckmann closed 2 months ago

bobby-beckmann commented 5 months ago

Stuck at authentication

When I go to this URL: https://athenaweb.piedmonthealth.local:9443/centricitypsAPIServer/oauth2/authorize?response_type=code&client_id=eyJhbGciOiJSUzI1NiJ9.eyJjbGllbnRfdXJpIjoiaHR0cHM6XC9cL3Byb3ZpZGVydGVjaC5haSIsImdyYW50X3R5cGVzIjpbImF1dGhvcml6YXRpb25fY29kZSJdLCJpc3MiOiJodHRwczpcL1wvbXlkYXRhLmdlaGVhbHRoY2FyZS5jb20iLCJyZWRpcmVjdF91cmlzIjpbImh0dHBzOlwvXC9kZXYuYWdlbnQ0LmFpXC9pbnRlZ3JhdGlvbnNcL2F0aGVuYWZsZXhfY2FsbGJhY2tcLyIsImh0dHBzOlwvXC9hcHAuYWdlbnQ0LmFpXC9pbnRlZ3JhdGlvbnNcL2F0aGVuYWZsZXhfY2FsbGJhY2tcLyJdLCJ0b2tlbl9lbmRwb2ludF9hdXRoX21ldGhvZCI6ImNsaWVudF9zZWNyZXRfYmFzaWMiLCJzb2Z0d2FyZV9pZCI6IjEuMC4wIiwibmF0aXZlX2NsaWVudCI6ZmFsc2UsImh0dHBzOlwvXC9teWRhdGEuZ2VoZWFsdGhjYXJlLmNvbVwvb2F1dGgyLmNsYWltc1wvYXBwX2lkIjoiMTYzYjZhMzQtYTI4ZS00NzA5LWFlNmUtMzJiMjIwNTViNTZjIiwiZXhwIjoyMDM0NDI4NzU5LCJjbGllbnRfbmFtZSI6IlByb3ZpZGVyVGVjaFByb2QiLCJpYXQiOjE3MTg4OTU5NTksImNvbnRhY3RzIjpbImJvYmJ5QHJldm1vLmFpIl0sInJlc3BvbnNlX3R5cGVzIjpbImNvZGUiXX0.Z7-FuU5RqT6GIHHr-v7297m9B4qePwAQD7yzlz57btTMW9R3YMAoO28-qzgmCXG0TPYyji6m6lRgete7MbppuUZWc5t58s4n_19Do8QrfL9kBdSWlAQww0aVfFygqaVbNWVb0Os_KIPi67iPCA-KD8Ke88sV4PMUFRhXQmEq2g4&redirect_uri=https%3A%2F%2Fdev.agent4.ai%2Fintegrations%2Fathenaflex_callback%2F&scope=openid+profile+user%2F%2A.%2A+offline_access&state=6JODyYk1djK4dsUeizNW2kYbUd7vgJ&aud=https%3A%2F%2Fathenaweb.piedmonthealth.local%3A9443%2FcentricitypsAPIServer%2Ffhir%2Fr4&verify=False&nonce=WM38SwETb4eAe3KSe3Fd

The error received

Not authorized at practice level. The access was revoked for application with client id : eyJhbGciOiJSUzI1NiJ9.eyJjbGllbnRfdXJpIjoiaHR0cHM6XC9cL3Byb3ZpZGVydGVjaC5haSIsImdyYW50X3R5cGVzIjpbImF1dGhvcml6YXRpb25fY29kZSJdLCJpc3MiOiJodHRwczpcL1wvbXlkYXRhLmdlaGVhbHRoY2FyZS5jb20iLCJyZWRpcmVjdF91cmlzIjpbImh0dHBzOlwvXC9kZXYuYWdlbnQ0LmFpXC9pbnRlZ3JhdGlvbnNcL2F0aGVuYWZsZXhfY2FsbGJhY2tcLyIsImh0dHBzOlwvXC9hcHAuYWdlbnQ0LmFpXC9pbnRlZ3JhdGlvbnNcL2F0aGVuYWZsZXhfY2FsbGJhY2tcLyJdLCJ0b2tlbl9lbmRwb2ludF9hdXRoX21ldGhvZCI6ImNsaWVudF9zZWNyZXRfYmFzaWMiLCJzb2Z0d2FyZV9pZCI6IjEuMC4wIiwibmF0aXZlX2NsaWVudCI6ZmFsc2UsImh0dHBzOlwvXC9teWRhdGEuZ2VoZWFsdGhjYXJlLmNvbVwvb2F1dGgyLmNsYWltc1wvYXBwX2lkIjoiMTYzYjZhMzQtYTI4ZS00NzA5LWFlNmUtMzJiMjIwNTViNTZjIiwiZXhwIjoyMDM0NDI4NzU5LCJjbGllbnRfbmFtZSI6IlByb3ZpZGVyVGVjaFByb2QiLCJpYXQiOjE3MTg4OTU5NTksImNvbnRhY3RzIjpbImJvYmJ5QHJldm1vLmFpIl0sInJlc3BvbnNlX3R5cGVzIjpbImNvZGUiXX0.Z7-FuU5RqT6GIHHr-v7297m9B4qePwAQD7yzlz57btTMW9R3YMAoO28-qzgmCXG0TPYyji6m6lRgete7MbppuUZWc5t58s4n_19Do8QrfL9kBdSWlAQww0aVfFygqaVbNWVb0Os_KIPi67iPCA-KD8Ke88sV4PMUFRhXQmEq2g4

bobby-beckmann commented 4 months ago

Anyway to get a response on this? I feel like there's some missing configuration that needs to happen.

deepaktiwari29 commented 4 months ago

@bobby-beckmann It seems like the server you are using is missing a client authentication setting. Could you provide us with more information about the server you're referring to so we can investigate?

bobby-beckmann commented 4 months ago

@deepaktiwari29 Sorry for the delay. Here's the details: We are running Athena Practice version 23.1.5095 We're trying to connect to the API server. The client id was created at the developer site, and we get that error when it comes back.

bobby-beckmann commented 4 months ago

Also @deepaktiwari29 we've heard from others that oauth won't work and we need a user/pass created for us? We'd like to avoid that if possible.

deepaktiwari29 commented 3 months ago

Hey @bobby-beckmann, If you have registered your app and marked it as "Production", all you need to do before start using it for the Authentication flow is add it to the API App Authorization list from the client. Please follow this path in athenaPractice client to add your app in the list: Home Page> Administration > System > Interoperability > API App Authorization

deepaktiwari29 commented 2 months ago

Hello @bobby-beckmann, hoping we have answered your questions. Marking this issue as closed, if you have any further questions, please open a new ticket.