Rest.OAuthProxy.new_with_token
Description: Reference for Rest.OAuthProxy.new_with_token

### Constructor

# Rest OAuthProxynew_with_token

#### Declaration [src]

    RestProxy*
    oauth_proxy_new_with_token (
      const char* consumer_key,
      const char* consumer_secret,
      const char* token,
      const char* token_secret,
      const gchar* url_format,
      gboolean binding_required
    )

#### Description [src]

Create a new `OAuthProxy` for the specified endpoint `url_format`, using the specified API key and secret.

`token` and `token_secret` are used for the Access Token and Token Secret, so if they are still valid then this proxy is authorised.

Set `binding_required` to `TRUE` if the URL contains string formatting operations (for example “http://foo.com/%s”. These must be expanded using `rest_proxy_bind()` before invoking the proxy.

#### Parameters

`consumer_key` | `const char*`
| The Consumer Key.
| The data is owned by the caller of the function.
| The value is a NUL terminated UTF-8 string.
`consumer_secret` | `const char*`
| The Consumer Secret.
| The data is owned by the caller of the function.
| The value is a NUL terminated UTF-8 string.
`token` | `const char*`
| The Access Token.
| The data is owned by the caller of the function.
| The value is a NUL terminated UTF-8 string.
`token_secret` | `const char*`
| The Token Secret.
| The data is owned by the caller of the function.
| The value is a NUL terminated UTF-8 string.
`url_format` | `const gchar*`
| The endpoint URL.
| The data is owned by the caller of the function.
| The value is a NUL terminated UTF-8 string.
`binding_required` | `gboolean`
| Whether the URL needs to be bound before calling.

#### Return value

Returns: | `RestProxy`
| A new `OAuthProxy`.
| The caller of the function takes ownership of the data, and is responsible for freeing it.