Authentication Settings

Mashape supports several authentication types to match your API's protocols. You can configure authentication settings inside the Documentation tab of your API.


Table of Contents

  1. Query Parameters
  2. HTTP Headers
  3. HTTP Basic
  4. OAuth 1.0a
  5. OAuth 2.0

Preface

Mashape supports the following Authentication types:

  • Query Parameters
  • HTTP Headers
  • HTTP Basic
  • OAuth 1.0a
  • OAuth 2.0

Check which Authentication type your API implemented and read below on how to configure them properly in Mashape.

Don't have time to implement an authentication on your API?
Mashape gives every provider API authentication and User management for free!

Query Parameters

The Query Parameters type lets you add several URL authentication parameters to your API.

Example:

https://api.yourapi.com/v1/{endpoint}?QueryParameter=Authentication

You can pass your Mashape APIKey to any Mashape API as a query string parameter.
The parameter name is "mashape-key" lowercase.
Example: https://myapi.p.mashape.com/endpoint?mashape-key=YourMashapeSecretkey

HTTP Headers

The HTTP Headers setting lets you add several header parameters to your API.

Example:

Auth-Header: 'Some Value Parsed by the Server'

HTTP Basic

The HTTP Basic setting follows the HTTP Basic Authentication protocol of Username:Password.

Example:

Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==

This setting will automatically require Username and Password in the Authentication section of the test console.

OAuth 1.0a

The OAuth 1.0a setting lets you set the Authorization URL, Access Token URL, Request Token URL, and Scopes.

You can find out more about setting OAuth 1.0a for specific client libraries in the Consuming APIs section.

OAuth 2.0

The OAuth 2.0 setting lets you set the Authorization URL, Access Token URL, and Scopes.

You can find out more about setting OAuth 2.0 for specific client libraries in the Consuming APIs section.