Okta api sessions error

I am using the login widget and a redirect URL and getting the sessiontoken from the url after the user is authenticated.

using python:

    url = "https://collabclasslh.okta.com/api/v1/sessions"
    headers = {
        'Accept': "application/json",
        'Content-Type': "application/json",
        'Authorization': "SSWS " + OktaAPIToken,
        'Cache-Control': "no-cache",            
    params = {
        "sessionToken": sessiontoken
    paramsJSON = json.dumps(params)
    response = requests.request("POST", url, data=paramsJSON, headers=headers)
    if response.status_code == 200:

This is the url from the signin widget:


and getting this response:

“errorCode”: “E0000022”,
“errorSummary”: “The endpoint does not support the provided HTTP method”,
“errorLink”: “E0000022”,
“errorId”: “oaetJ_xFNaZSD2aLFl0992wMA”,
“errorCauses”: []

What could be causing this?