Dear All,
Hope this email finds you well. I am facing a error koha rest api , I explained below -
I use the below code base for the koha rest api . When I check the bywater koha demo site's rest api, it's working fine but When I checked my demo koha site, getting authentication error(401)
I entered the correct client id and secret ssl certificate installed correctly. My api worked properly using the chrome RESTer tool. Thanks in advance .
import requests
import json
import os
from requests.structures import CaseInsensitiveDict
import http.client
#from dotenv import load_dotenv
#load_dotenv()
data = {
"client_id": "e877bce0-78bc-4d39-a0c1-2df7fccb1397",
"client_secret": "461cda1a-665d-4d24-a0e0-dace5f83a1f4",
"grant_type": "client_credentials",
}
credentials = response.json()
print(credentials)
access_token = credentials['access_token']
print("Access_token: ",access_token)
#auth2 = CaseInsensitiveDict()
auth2={"content-type":"application/json","authorization": f"Bearer {access_token}"}
print(auth2)
)
print(response)
Regrads,
Esharat Mia