Jump to content

Setting up OAUTH/REST API on IIS


Sean Wilkins

Recommended Posts

I'm trying to setup the OAUTH/REST API via IIS 7 on my local machine but I keep receiving this message: 

"The API endpoint is not giving the expected response. Check you followed the instructions correctly. The URL being tested is:"

My web.config is as follows: 

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <defaultDocument>
            <files>
                <clear />
                <add value="index.php" />
                <add value="Default.htm" />
                <add value="Default.asp" />
                <add value="index.htm" />
                <add value="index.html" />
                <add value="iisstart.htm" />
                <add value="default.aspx" />
            </files>
        </defaultDocument>
        <rewrite>
          <rules>
		  	<rule name="API Rewrite" stopProcessing="true">
				<match url="^api/*" ignoreCase="false" />
				 <conditions>
					<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
					<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
				</conditions>
				<action type="Rewrite" url="api/index.php" appendQueryString="true" />
			</rule>
            <rule name="Imported Rule 1" stopProcessing="true">
              <match url="\.(js|css|jpeg|jpg|gif|png|ico|map)(\?|$)" />
              <conditions>
                <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
              </conditions>
              <action type="Rewrite" url="/404error.php" />
            </rule>
            <rule name="Rewrite Rules" stopProcessing="true">
              <match url="^(.*)$" ignoreCase="false" />
              <conditions>
                <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
                <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
              </conditions>
              <action type="Rewrite" url="/index.php" appendQueryString="true" />
            </rule>
          </rules>
        </rewrite>
    </system.webServer>
</configuration>

This initially allowed me past the message supplied above, until I setup a local SSL certificate and then the message returned.

Any help would be greatly appreciated.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...