PHP 8.4.0 RC2 available for testing

Predefined Constants

The constants below are defined by this extension, and will only be available when the extension has either been compiled into PHP or dynamically loaded at runtime.

Most of these constants involve problems, which are also described within the official OAuth » Problem Reporting documentation. Note however, that these constant names are specific to PHP, although the naming scheme is similar.

OAUTH_SIG_METHOD_RSASHA1 (string)
OAuth RSA-SHA1 signature method.
OAUTH_SIG_METHOD_HMACSHA1 (string)

OAuth HMAC-SHA1 signature method.

OAUTH_SIG_METHOD_HMACSHA256 (string)
OAuth HMAC-SHA256 signature method.
OAUTH_AUTH_TYPE_AUTHORIZATION (string)

This constant represents putting OAuth parameters in the Authorization header.

OAUTH_AUTH_TYPE_NONE (string)

This constant indicates a NoAuth OAuth request.

OAUTH_AUTH_TYPE_URI (string)

This constant represents putting OAuth parameters in the request URI.

OAUTH_AUTH_TYPE_FORM (string)

This constant represents putting OAuth parameters as part of the HTTP POST body.

OAUTH_HTTP_METHOD_GET (string)

Use the GET method for the OAuth request.

OAUTH_HTTP_METHOD_POST (string)

Use the POST method for the OAuth request.

OAUTH_HTTP_METHOD_PUT (string)

Use the PUT method for the OAuth request.

OAUTH_HTTP_METHOD_HEAD (string)

Use the HEAD method for the OAuth request.

OAUTH_HTTP_METHOD_DELETE (string)
Use the DELETE method for the OAuth request.
OAUTH_REQENGINE_STREAMS (int)
Used by OAuth::setRequestEngine() to set the engine to PHP streams, as opposed to OAUTH_REQENGINE_CURL for Curl.
OAUTH_REQENGINE_CURL (int)
Used by OAuth::setRequestEngine() to set the engine to Curl, as opposed to OAUTH_REQENGINE_STREAMS for PHP streams.
OAUTH_OK (int)
Life is good.
OAUTH_BAD_NONCE (int)
The oauth_nonce value was used in a previous request, therefore it cannot be used now.
OAUTH_BAD_TIMESTAMP (int)
The oauth_timestamp value was not accepted by the service provider. In this case, the response should also contain the oauth_acceptable_timestamps parameter.
OAUTH_CONSUMER_KEY_UNKNOWN (int)
The oauth_consumer_key is temporarily unacceptable to the service provider. For example, the service provider may be throttling the consumer.
OAUTH_CONSUMER_KEY_REFUSED (int)
The consumer key was refused.
OAUTH_INVALID_SIGNATURE (int)
The oauth_signature is invalid, as it does not match the signature computed by the service provider.
OAUTH_TOKEN_USED (int)
The oauth_token has been consumed. It can no longer be used because it has already been used in the previous request(s).
OAUTH_TOKEN_EXPIRED (int)
The oauth_token has expired.
OAUTH_TOKEN_REVOKED (int)
The oauth_token has been revoked, and will never be accepted.
OAUTH_TOKEN_REJECTED (int)
The oauth_token was not accepted by the service provider. The reason is not known, but it might be because the token was never issued, already consumed, expired, and/or forgotten by the service provider.
OAUTH_VERIFIER_INVALID (int)
The oauth_verifier is incorrect.
OAUTH_PARAMETER_ABSENT (int)
A required parameter was not received. In this case, the response should also contain the oauth_parameters_absent parameter.
OAUTH_SIGNATURE_METHOD_REJECTED (int)
The oauth_signature_method was not accepted by service provider.

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top