Method Community

 

200 Response but the content is the Method homepage.

Last post 07-22-2022 8:57 AM by Method_Mamoon. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 07-18-2022 4:57 PM

    200 Response but the content is the Method homepage.

    import requests

    url = "https://domain.method.me/api/v1/tables/Contacts/7"

    headers = {
    'Authorization': f'Bearer {key}'
    }

    response = requests.request("GET", url, headers=headers, data = payload)

    print(response.text.encode('utf8'))

    b'<!DOCTYPE html>\n<html lang="en-US">\n<head><meta charset="UTF-8"><script>if(navigator.userAgent.match(/MSIE|Internet Explorer/i)||navigator.userAgent.match(/Trident\\/7\\..*?rv:11/i)){var href=document.location.href;if(!href.match(/[?&]nowprocket/)){if(href.indexOf("?")==-1){if(href.indexOf("#")==-1){document.location.href=href+"?nowprocket=1"}else{document.location.href=href.replace("#","?nowprocket=1#")}}else{if(href.indexOf("#")==-1) ...

    I have also tried testing the endpoint in Postman but I'm having the same issue. The response code is 200 but the content is the homepage.

    I am just using an APIKey and don't want to use OAuth2.

    Thank you,

    Dave

  • 07-22-2022 8:57 AM In reply to

    Re: 200 Response but the content is the Method homepage.

    Hey dvananda,

    It seems like the URL is incorrect, could you try changing it to "https://rest.method.me/api/v1/tables/Contacts/7".

    Let me know if that works!

    Thank you.

    Mamoon Syed
    Product Manager
    Method Integration Inc.
Page 1 of 1 (2 items)